From maechler at stat.math.ethz.ch  Sat Apr 18 19:02:19 2009
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Sat, 18 Apr 2009 19:02:19 +0200
Subject: [Rd] dotplot in a loop
In-Reply-To: <001801c9c043$92d934e0$b88b9ea0$@com.sg>
References: <mailman.0.1240072187.27009.r-devel@r-project.org>
	<001801c9c043$92d934e0$b88b9ea0$@com.sg>
Message-ID: <18922.1947.749283.285184@cmath-5.math.ethz.ch>

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

Please do not misuse R-devel!

Regards,
Martin

>>>>> "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



[Rd] dotplot in a loop
Martin Maechler