We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 627c416 commit cd852f7Copy full SHA for cd852f7
R/reshape-add-margins.R
@@ -8,7 +8,7 @@ reshape_add_margins <- function(df, vars, margins = TRUE) {
8
# Prepare data frame for addition of margins
9
addAll <- function(x) {
10
x <- addNA(x, TRUE)
11
- factor(x, levels = c(levels(x), "(all)"), exclude = NULL)
+ factor(x, levels = c(levels(x), "(all)"), exclude = NULL, ordered = FALSE)
12
}
13
vars <- unique0(unlist(margin_vars))
14
df[vars] <- lapply(df[vars], addAll)
0 commit comments