make_columns_numeric: Add numeric versions of columns

View source: R/surveys.R

make_columns_numericR Documentation

Add numeric versions of columns

Description

Take a data frame and add numeric versions of specified factor columns

Usage

make_columns_numeric(df, cols, fun = as.numeric, ...)

Arguments

df

The data.frame with the source data

cols

A list of column names to convert

fun

The function to apply to all of the columns

...

Additional parameters to fun

Value

A new data frame with additional columns. Each column listed in cols will have a new version added, column_n, containing the data data as in column convert to numeric


rwash/surveys documentation built on Sept. 18, 2023, 11:31 p.m.