as_factor_keep_attributes {tern} | R Documentation |
Conversion of a vector to a factor
Description
Converts x
to a factor and keeps its attributes. Warns appropriately such that the user
can decide whether they prefer converting to factor manually (e.g. for full control of
factor levels).
Usage
as_factor_keep_attributes(
x,
x_name = deparse(substitute(x)),
na_level = "<Missing>",
verbose = TRUE
)
Arguments
x |
( |
x_name |
( |
na_level |
( |
verbose |
( |
Value
A factor
with same attributes (except class) as x
. Does not modify x
if already a factor
.
[Package tern version 0.9.5 Index]