[R] [Fwd: R 2.20 Windows XP anaolgue of Splus unix() command ?]

Dave Armstrong davearmstrong.ps at gmail.com
Fri Jun 9 16:23:19 CEST 2006


Mark,

I don't know how many of these files you have, so this may not be a
viable solution, but what if you changed the function "wait" to be
something like the following:

wait <- function() par(ask=T)
for(i in 1:100){
plot(rnorm(100) ~ rnorm(100))
wait()
}

So, in general, this is not a solution to the unix() question, but it
seems to produce what you want in this case.

Hope this helps,
Dave.

Dave Armstrong
University of Maryland
Dept of Government and Politics
3140 Tydings Hall
College Park, MD 20742
Office: 2103L Cole Field House
Phone: 301-405-9735
e-mail: darmstrong at gvpt.umd.edu
web: www.davearmstrong-ps.com

Facts are meaningless.  You can use facts to prove anything that's
even remotely true. - Homer Simpson

On 6/9/06, ronggui <ronggui.huang at gmail.com> wrote:
> In my windows XP there is no "read" command as well,so the _
> unix("read stuff")_  will not wor as what _system_ function does is to
> pass the 'read stuff' command argument to the system command.
>
> I guess the "read" command to specific to some Unix OS.
>
> Hope this helps.
>
> 2006/6/9, markleeds at verizon.net <markleeds at verizon.net>:
> > >Hi Everyone : As I mentioned earlier, I am taking a lot
> > >of Splus code and turning into R and I've run into
> > >another stumbling block that I have not been
> > >able to figure out.
> > >
> > >I did plotting in a loop when I was using Splus on unix
> > >and the way I made the plots stop so I could
> > >lookat them as they got plotted ( there are hundreds
> > >if not thousands getting plotted sequentially )
> > >on the screen was by using the unix() command.
> > >
> > >Basically, I wrote a function called wait()
> > >
> > >
> > >wait<-function()
> > >{
> > >cat("press return to continue")
> > >unix("read stuff")
> > >}
> > >
> > >and this worked nicely because I then
> > >did source("program name") at the Splus prompt and
> > >a plot was created on the screen  and then
> > >the wait() function was right under the plotting code
> > >in the program so that you had to hit the return key to go to the next plot.
> > >
> > >I am trying to do the equivalent on R 2.20/windows XP
> > >I did a ?unix in R and it came back with system() and
> > >said unix was deprecated so I replaced unix("read stuff") with system("read stuff") but all i get is a warning "read not found" and
> > >it flies through the successive plots and i can't see them.
> > >
> > >Thanks for any help on this. It's much appreciated.
> > >
> > >                                        Mark
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> >
>
>
> --
> »ÆÈÙ¹ó
> Deparment of Sociology
> Fudan University
>
>
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>



More information about the R-help mailing list