mutate_all_types | R Documentation |
utils::type.convert()
.'Turns factors into characters and numerics where possible.
mutate_all_types(dat)
dat |
data.frame to convert |
data.frame with no factors
Kelly Sovacool, sovacool@umich.edu
## Not run:
dat <- data.frame(
c1 = as.factor(c("a", "b", "c")),
c2 = as.factor(1:3)
)
class(dat$c1)
class(dat$c2)
dat <- mutate_all_types(dat)
class(dat$c1)
class(dat$c2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.