[R] Welcome to the "R-help" mailing list

Qifei Zhu zhu_qifei at yahoo.com.sg
Sat Apr 18 19:14:30 CEST 2009


Hi all,

I'm a newbie R developer, am trying to dotplot a few graphs using a for
loop.

The following code works fine but once I wanna plot inside a loop, nothing
happens.
> for(i in 1:1){dotplot(y~x)}
> y <- c(1,2,3)
> x <- c('a','b','c')
> dotplot(y~x)

> for (i in 1:3) {dotplot(y~x)} (y and x depends on I in actual case)
Nothing happens.

I appreciate your advice on what is going wrong? Thanks.

Best,
Tony




More information about the R-help mailing list