[R] xyplot inside a for loop problem
Vaclav Petricek
vaclav.petricek at mff.cuni.cz
Fri Mar 26 01:13:25 CET 2004
Hello everyone
Could someone please explain me why are xyplot() calls inside a for loop
unsuccessful?
Calling plot() is OK but xyplot() just opens the graphics window and that
is all. No error, no warning :-( The same xyplot() outside for loop works
fine.
---------------------------------------------------------
library(lattice)
# OK:
plot(1,2,type='p',main='standalone plot')
# OK:
for (name in 1) plot(1,2,type='p',main='plot in for')
# OK:
xyplot(1~2,type='p',main='standalone xyplot')
# This does not plot anything:
for (name in 1) xyplot(1~2,type='p',main='xyplot in for')
---------------------------------------------------------
Thank you very much for your help
Vaclav
More information about the R-help
mailing list