[Rd] dotplot in a loop

Martin Maechler maechler at stat.math.ethz.ch
Sat Apr 18 19:02:19 CEST 2009

This is *definitely* a question for R-help,
not for R-devel.

Please do not misuse R-devel!


>>>>> "QZ" == Qifei Zhu <zhu_qifei at yahoo.com.sg>
>>>>>     on Sat, 18 Apr 2009 12:34:38 -0400 writes:

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

    QZ> The following code works fine but once I wanna plot inside a loop, nothing
    QZ> 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)
    QZ> Nothing happens.

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

    QZ> Best,
    QZ> Tony

    QZ> ______________________________________________
    QZ> R-devel at r-project.org mailing list
    QZ> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list