I ran xyplot presidential election in pscl package and got an error
data(presidentialElections) library(lattice) xyplot(demVote ~ year | state, panel=panel.lines, ylab="Democratic Vote for President (percent)", xlab="Year", data=presidentialElections, scales=list(y=list(cex=.6),x=list(cex=.35)), strip=strip.custom(par.strip.text=list(cex=.6))) Error: Error in recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) : invalid graphics state
I am a new R user and would appreciate it if anyone could help me fix the error.
source share