powered by
This function returns a object a colors values according to a palette function
as.colors(x, col.na="#E6E6E6",palette="rainbow", ...)
A object (vector or matrix) to convert in colors.
Colors to use for missing values.
The palette function to use
Additional argument for the palette function. The 'n' parameters must exist in the palette function
A vector or matrix of color label.
# NOT RUN { lab1<-c(rep("a",5), rep("b",5)) lab2<-c(rep("c",5), rep("a",5)) as.colors(lab1) as.colors(rbind(lab1, lab2)) as.colors(lab2, palette="heat.colors", alpha=0.8) # }
Run the code above in your browser using DataLab