colors.byexpression(ProGenExpress) | R Documentation |
The function creates a vector of "red" and "green" (or greyscale) colors. It
calculates how many bars will be in the plot created by plotrange
and returns a vector of the appropriate size. Positive numbers are assigned red
(gray75) and negative numbers are assigned green (gray25)
colors.byexpression(linked = NULL, cnames = "M", greyscale = FALSE)
linked |
A data.frame of numerical values |
cnames |
The column names of linked (above) that contain numerical values to be plotted |
greyscale |
Boolean to decide if the colors should be greyscale |
A vector of colors
Michael Watson
## Note you do not normally have to call this function ## it is used internally by ProGenExpress data <- cbind(rnorm(10),rnorm(10)) colnames(data) <- c("M1","M2") colors.byexpression(data,cnames=c("M1","M2")) colors.byexpression(data,cnames=c("M1","M2"),greyscale=TRUE)