[Rd] Surprising behaviour of levelplot in lattice package

Wolfgang Huber huber at ebi.ac.uk
Wed Feb 13 17:17:32 CET 2008

Hi Deepayan,

levelplot from the lattice package produces a peculiar output when
called on a matrix whose column or row names contained duplicated
elements. In particular, the plot contains white stripes, and the
arrangement of data regions and axes labels seems messed up. I did not
see this documented (my apologies if this is an oversight) and guess
that it is unintended:

m = matrix(runif(12L), ncol=3L)
colnames(m) = c("A", "A", "B")
rownames(m) = c("x", "y", "y", "z")

Best wishes

Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber

> sessionInfo()
R version 2.7.0 Under development (unstable) (2008-02-13 r44450)


attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] lattice_0.17-4 fortunes_1.3-4

loaded via a namespace (and not attached):
[1] grid_2.7.0

More information about the R-devel mailing list