Skip to content

panel.levelplot.raster: fix for y being a factor#47

Open
aitap wants to merge 1 commit into
deepayan:masterfrom
aitap:fix-levelplot-y-factor
Open

panel.levelplot.raster: fix for y being a factor#47
aitap wants to merge 1 commit into
deepayan:masterfrom
aitap:fix-levelplot-y-factor

Conversation

@aitap

@aitap aitap commented Jul 4, 2026

Copy link
Copy Markdown

Steps to reproduce:

library(lattice)

x <- expand.grid(factor = factor(letters[1:3]), numeric = 1:4)
x$value <- runif(nrow(x))

levelplot(value ~ factor + numeric, x, useRaster = TRUE) # works well
levelplot(value ~ numeric + factor, x, useRaster = TRUE) # fails

The code fails due to a typo: the y.is.factor branch creates a variable named ux but later the code expects to work with uy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant