new version ready

This commit is contained in:
Andreas Gammelgaard Damsbo 2026-03-31 20:42:22 +02:00
commit de52a56b1f
No known key found for this signature in database
11 changed files with 27 additions and 147 deletions

View file

@ -56,30 +56,12 @@ plot_bar_single <- function(data, pri, sec = NULL, style = c("stack", "dodge", "
if (nrow(p_data) > max_level) {
# browser()
p_data <- sort_by(
p_data,
p_data[["Freq"]],
decreasing = TRUE
) |>
head(max_level)
# if (is.null(sec)){
# p_data <- sort_by(
# p_data,
# p_data[["Freq"]],
# decreasing=TRUE) |>
# head(max_level)
# } else {
# split(p_data,p_data[[sec]]) |>
# lapply(\(.x){
# # browser()
# sort_by(
# .x,
# .x[["Freq"]],
# decreasing=TRUE) |>
# head(max_level)
# }) |> dplyr::bind_rows()
# }
}
## Shortens long level names