powered by
defaults to convert all character columns except named 'C' to numeric useful for nonmem ready datasets with `.` for missing values
char_to_numeric(df, exclude_cols = "C")
dataframe to convert character columns to numeric
vector of column names to be skipped from conversion
dataframe
# 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) # }
Run the code above in your browser using DataLab