Pscl package R

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.

+4
source share
2 answers

Try dev.off() and then re-run the same code.

+3
source

I personally use tinn r for programming in R and find it very useful, you can easily close / open R and still send command lines (you can even load different versions of R for different packages of R)

0
source

All Articles