Use the cut() function to produce the interval categories and color
names in the data frame and then pass that variable to the col =
argument in the appropriate plot function. Something like
mydata$mycolors <- cut(mydata$value, c(-Inf, 1, 2, 3, Inf), label =
c('blue', 'green', 'yellow'))
Ask an a
Hi everyone,
I was wondering if there was a simple way to assign a color to a cell
based on value in a data frame and return the cell as an image? For
example, if the value is >1, then blue, if between 1 and 2, green, if
between 2 and 3, yellow, etc.
I tried using a heatmap function but I wa
2 matches
Mail list logo