round_columns: round columns

View source: R/round_columns.R

round_columnsR Documentation

round columns

Description

round columns

Usage

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

## 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)

metrumresearchgroup/PKPDmisc documentation built on Oct. 21, 2022, 9:41 a.m.