powered by
Converts a vector of characters into factors and then converts these into numeric.
as.fumeric(x, levels = unique(x))
a character vector
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))
Run the code above in your browser using DataLab