[R] color.scale error

Alaios alaios at yahoo.com
Thu Feb 17 18:31:18 CET 2011


Dear all
when I call color.scale like this:


require('plotrix')
colcolor<-color.scale(c(range_sr,sr),extremes=c("red","blue"))


Error in if (min(reds) < 0 || max(reds) > 1) reds <- rescale(reds, c(0,  : 
  missing value where TRUE/FALSE needed


range_sr 
[1] -10.00000000000000  44.02977813958366

str(sr)
 num [1:100, 1:100] 2.54 2.71 2.89 2.95 3.03 ...


this was working on simpler data sets before. 

How can I understand more what was the problem in depth.? I have read the source code of color.scale but unfortunately I did not make any progress to understand this error message. Is it possible to raise an exception before the error happens and see what went wrong?

Regards
Alex



More information about the R-help mailing list