Open drfloren opened 2 months ago
Current implementation has fct_infreq locked in descending order. Request is to passthrough an argument to order allowing both directions.
fct_infreq
order
Current version is:
fct_infreq <- function(f, w = NULL, ordered = NA) { f <- check_factor(f) w <- compute_weights(f, w) check_bool(ordered, allow_na = TRUE) lvls_reorder(f, order(w, decreasing = TRUE), ordered = ordered) }
Example with update would be something like:
fct_infreq <- function(f, w = NULL, ordered = NA, desc = TRUE) { f <- check_factor(f) w <- compute_weights(f, w) check_bool(ordered, allow_na = TRUE) lvls_reorder(f, order(w, decreasing = desc), ordered = ordered) }
Current implementation has
fct_infreq
locked in descending order. Request is to passthrough an argument toorder
allowing both directions.Current version is:
Example with update would be something like: