Description Usage Arguments Value Examples
Converts factors into numeric or character arrays
1 | factorConvert(var, to = "character")
|
var |
an array of factors to be converted |
to |
a string indicating whether factor should be converted to a character (to = "c") or a numeric (to = "n") |
a vector containing a converted version of var
1 2 3 4 5 6 | > factorConvert(var = as.factor(letters[1:5]), to = "c")
[1] "a" "b" "c" "d" "e"
> factorConvert(var = as.factor(1:5), to = "c")
[1] "1" "2" "3" "4" "5"
> factorConvert(var = as.factor(1:5), to = "n")
[1] 1 2 3 4 5
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.