facToChar | R Documentation |
Function transforms all data frame columns of a specific class into another class.
facToChar ( dataFrame, from = "factor", to = "character")
dataFrame |
a data frame |
from |
which column class should be transformed? |
to |
target column class |
a data frame
Sebastian Weirich
data(mtcars)
### original classes
sapply(mtcars, class)
mtcars1 <- facToChar(mtcars, from = "numeric", to = "character")
sapply(mtcars1, class)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.