View source: R/changeColTypes.R
changeColType | R Documentation |
Changes column types based on vectors of column names and readr types
changeColType(df, cols, types)
df |
data.frame/tibble |
cols |
Character vector of columns in df to change |
types |
Character vector of new column types (readr-like) |
A data.frame/tibble
First created in 2020-12-11 while working in the MARC-KC/CovidDataEntry Repository
## Not run: class(iris[['Species']]) irisNew <- changeColType(iris, cols = c("Species"), types=c('c')) class(irisNew[['Species']]) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.