char_to_numeric: convert all columns to numeric

Description Usage Arguments Value Examples

View source: R/char_to_numeric.R

Description

defaults to convert all character columns except named 'C' to numeric useful for nonmem ready datasets with '.' for missing values

Usage

1
char_to_numeric(df, exclude_cols = "C")

Arguments

df

dataframe to convert character columns to numeric

exclude_cols

vector of column names to be skipped from conversion

Value

dataframe

Examples

1
2
3
4
5
6
## Not run: 
nm_dat <- char_to_numeric(nm_dat)
   # if 'C' col is 0/1 rather than typical 'C' or '.'
nm_dat <- char_to_numeric(nm_dat, exclude_cols = NULL) 

## End(Not run)

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