round_columns: round columns

Description Usage Arguments Details Examples

View source: R/round_columns.R

Description

round columns

Usage

1
round_columns(df, col_list)

Arguments

df

data frame

col_list

list of vectors of columns and number of digits to round each

Details

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

Examples

 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)

PKPDmisc documentation built on April 14, 2020, 5:49 p.m.