Description Usage Arguments Details Value Note Author(s)
Removes all factors from a variable in a sensible way
1 |
var |
The variable from which you want the factors removed |
As factors are their own type, to remove factors we must convert each level into another type. This is currently done using "typeless" behaviour: a factor is converted to a numeric vector if this can be done without inducing NAs, otherwise it is coerced using as.character. Currently supported types are: /codefactor, /codedata.frame and /codelist.
The variable with all factors converted to characters or numbers
This function is written by Matthew D. Young and is used
in the goseq
package.
Matthew D. Young myoung@wehi.edu.au, Gu Mi mig@stat.oregonstate.edu, Yanming Di diy@stat.oregonstate.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.