Hello Peng Yu,

Invert the order of plot and par.  See below:

x=1:10
y=1:10
X11()

par(ask=T)
plot(x,y)

That should wait for some user input.

I hope that helps,

Joshua

On Sun, Sep 6, 2009 at 2:23 PM, Peng Yu <pengyu.ut@gmail.com> wrote:

> Hi,
>
> The following script will run without asking me anything.
>
> $ Rscript plot.R
> > x=1:10
> > y=1:10
> > X11()
> > plot(x,y)
> > par(ask=T)
> >
>
> Regards,
> Peng
>
> On Sun, Sep 6, 2009 at 11:55 AM, RIOS,ALFREDO ARTURO<arios@ufl.edu> wrote:
> > Hi Peng
> >
> > I think this is what you are looking for
> >
> > par(ask=T)
> >
> > Alfredo
> >
> >
> > On Sun Sep 06 12:52:31 EDT 2009, Peng Yu <pengyu.ut@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> In 'example(barplot)' running in R, I see 'Hit <Return> to see next
> >> plot:', then R waits for my input. I am wondering how to wait for a
> >> user response in Rscript.
> >>
> >> Regards,
> >> Peng
> >>
> >> ______________________________________________
> >> R-help@r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide
> >> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> >> and provide commented, minimal, self-contained, reproducible code.
> >>
> >>
> >
> >
> >
> > --
> > RIOS,ALFREDO ARTURO
> >
> >
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Joshua Wiley
Senior in Psychology
University of California, Riverside
http://www.joshuawiley.com/

	[[alternative HTML version deleted]]


