as.fumeric | R Documentation |
Converts a vector of characters into factors and then converts these into numeric.
as.fumeric(x, levels = unique(x))
x |
a character vector |
levels |
the leves to be used in the call to factor |
Rafael A. Irizarry
group = c("a","a","b","b")
plot(seq_along(group),col=as.fumeric(group))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.