Description Usage Arguments Value
This function retrieves the *values* within a factor object. There is a subtle but serious gotcha when using factors that is outlined in the help for factor() under the Warning section. Notably, then type-casting factors, what is returned is the *indices* of the factor, not the values stored in the factor. This is fairly easy to catch when factors are type character, but can cause serious bugs when they are numeric. The purpose of this function is to provide an easy way to return the values stored within a factor
1 | factorValues(x)
|
x |
the factor from which to extract values |
the values stored in the factor; this will be numeric if possible, character otherwise
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.