mutate_all_types {mikropml} | R Documentation |
Mutate all columns with utils::type.convert()
.'
Description
Turns factors into characters and numerics where possible.
Usage
mutate_all_types(dat)
Arguments
dat |
data.frame to convert |
Value
data.frame with no factors
Author(s)
Kelly Sovacool, sovacool@umich.edu
Examples
## 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)
[Package mikropml version 1.6.1 Index]