Description Usage Arguments Value Functions See Also Examples
to_factor
Convert vector to factor with corresponding value labels or
unique values in the vector. Note that the 'NA' or blank values will be excluded.
It will return a factor with original values if there's no value label.
1 2 3 4 5 | to_factor(x, ordered = TRUE)
to_character(x)
to_numeric(x)
|
x |
vector |
ordered |
logical flag to determine if the levels should be regarded as ordered. |
Factor of the same form as x but with value labels instead of values.
to_character
: Convert vector to character with corresponding unique
values in the vector as value labels and keep the variable labels. Note that
the 'NA' or blank values will be excluded. It will return a character with
original values as value labels if there's no value label.
to_numeric
: Convert vector to numeric and keep the variable labels.
val_lab, var_lab
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.