View source: R/data_manip_utils.R
fac2char | R Documentation |
This is useful when you forgot to specify stringsAsFactors = FALSE
when creating your data frame.
fac2char(df)
df |
The data frame in which fo convert factors. |
df
, with all factor columns converted to character
vectors.
as.character()
, data.frame()
x <- data.frame(letters, 1:26, LETTERS) sapply(x, class) x2 <- fac2char(x) sapply(x2, class)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.