Skip to content

Commit

Permalink
Ensure factors become large factors objects (this drastically speeds …
Browse files Browse the repository at this point in the history
…up summary statistics
  • Loading branch information
domjarkey committed Sep 9, 2022
1 parent 0c641d6 commit 037c3b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/codeBookGeneric.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ writeCodeBookLatexGeneric <- function(
if (cls == "integer") {
x <- as.integer(as.numeric(x))
}
if (cls == "factor") {
x <- factor(levels(x)[as.integer(x)], levels = levels(x))
}
}

} else {
Expand Down

0 comments on commit 037c3b0

Please sign in to comment.