Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Feb 13, 2024
1 parent b6c9c73 commit 32b9dd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/data_xtabulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
colnames(out) <- c("Value", "by", "N")
total_n <- sum(out$N, na.rm = TRUE)

# we want to round N for weighted frequencies
if (!is.null(weights)) {
out$N <- round(out$N)
}

out <- data_to_wide(out, values_from = "N", names_from = "by")

# use variable name as column name
Expand Down

0 comments on commit 32b9dd1

Please sign in to comment.