ys_factors_fl | R Documentation |
The user passes a data set to modify, a yspec
object, and the names of
flags in the yspec object to create factors in the data set using
ys_factors()
.
ys_factors_fl(data, spec, ...)
data |
the data set to modify. |
spec |
a yspec object. |
... |
tidy-select specification of flag names to select. |
Only eligible columns will be considered for factor creation (either
a values
field is present or the make_factor
flag is set).
Therefore, a flag containing a general list of data columns
(potentially continuous and discrete) could be passed without
generating an error.
ys_factors()
, ys_add_factors()
data <- ys_help$data()
spec <- ys_help$spec()
names(ys_flags(spec))
data <- ys_factors_fl(data, spec, cat)
head(data, 2)
data <- ys_factors_fl(data, spec, covariate, nm)
head(data, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.