Antje <niederlein-rstat <at> yahoo.de> writes: > I have a question concerning the behaviour of the colouring with levelplot. > > If I give the parameters "at" and "col.regions" like this: > > at <- c(1,2,3,4,5,6) > col.regions <- c("blue","blue","blue","yellow","yellow","yellow") > > Which color would have the value 3.5? > I would have expected yellow, no?
You implicitly expect round(). [1] "blue" > col.regions[3.5] [1] "blue" > col.regions[round(3.5)] [1] "yellow" Your question implies that you may also susceptible to the problem of R FAQ 7.31, "Why doesn't R think these numbers are equal?" Dieter ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.