convert column to type numeric

cols_to_numeric(df, col_names)

Arguments

df

dataframe

col_names

vector of column names or indices to convert to numeric

Examples

# NOT RUN {
df <- cols_to_numeric(df, c("DOSE", "TRT")) # will convert dose and TRT columns to numeric
# }