Description Usage Arguments Details Examples
View source: R/round_columns.R
round columns
1 | round_columns(df, col_list)
|
df |
data frame |
col_list |
list of vectors of columns and number of digits to round each |
col_list should contain a list of list tuples, where the first element is a vector of column names to round, and the second value should be the number of digits to round to
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
col_list <- list(
list("AGE", 1),
list(c("WEIGHT",
"SCREATININE",
"SERUMALT",
"DELDBP",
"DELSBP"),
2)
)
aht_trial_rounded <- round_columns(aht_trial2, col_list)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.