deepayan@stat.wisc.edu
2003-Dec-22 18:20 UTC
(PR#6005) Re: [Rd] [R] lattice: levelplot: error: min not meaningful
Actually, this is supposed to work (and is given as an example in my DSC-2003 paper), and at some point, did. It seems this was broken as a consequence of a careless change in panel.levelplot. The first 5 lines should have been label.style <- match.arg(label.style) x <- as.numeric(x[subscripts]) y <- as.numeric(y[subscripts]) minXwid <- min(diff(sort(unique(x)))) minYwid <- min(diff(sort(unique(y)))) instead of label.style <- match.arg(label.style) minXwid <- min(diff(sort(unique(x)))) minYwid <- min(diff(sort(unique(y)))) x <- as.numeric(x[subscripts]) y <- as.numeric(y[subscripts]) I'll fix it eventually, for now a workaround is to have levelplot( yield ~ year * variety | site, barley, panel = function(x, y, ...) { x <- as.numeric(x) y <- as.numeric(y) panel.levelplot(x, y, ...) }) Deepayan On Monday 22 December 2003 10:52, Prof Brian Ripley wrote:> From the help page: > > formula: a formula of the form 'z ~ x * y | g1 * g2 * ...', where 'z' > is a numeric response, and 'x, y' are numeric values > evaluated on a rectangular grid. > > Please explain why you think that acting as documented necessitates a bug > report? > > On Mon, 22 Dec 2003 wolfram@fischer-zim.ch wrote: > > R 1.8.1: > > > > ___COMMAND____________________________________________ > > > > levelplot( yield ~ year * variety | site, barley ) > > > > > > ___ERROR_MESSAGE______________________________________ > > > > Error in Summary.factor(..., na.rm = na.rm) : > > "min" not meaningful for factors > > > > ___COMMENT____________________________________________ > > > > levelplot( yield ~ as.numeric(year) * as.numeric(variety) | site, barley > > ) is working but the labels are nasty. > > > > Best regards > > Wolfram > > > > ______________________________________________ > > R-devel@stat.math.ethz.ch mailing list > > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
Possibly Parallel Threads
- [R] lattice: levelplot: error: min not meaningful for factor (PR#6005)
- [R] proposal: lattice/levelplot: panel.catlevelplot
- lattice: defining an own function using args for "formula" and "groups"
- lattice: showing panels for factor levels with no values
- Adding ranks to a repeatedly ragged array