[R] How to pop up the graphics window from Rscript?

David Winsemius dwinsemius at comcast.net
Sun Sep 6 19:41:02 CEST 2009


Perhaps you should read the Posting Guide (again?) and then adopt a  
consistent practice of including system information in your questions  
to r-help. Not everyone keeps a mental list of what OS you are using.  
Graphics commands are highly OS specific.

capabilities() # at an interactive R prompt anyway, will return a list  
of devices for your system.

You may want X11() since you are on a Linux box, but my experience on  
Linux is virtually nil, so that's a guess based on reading prior  
postings.

-- 
David.

On Sep 6, 2009, at 1:07 PM, Peng Yu wrote:

> I get the following error.
>
> $ Rscript plot.R
>> x=1:10
>> y=1:10
>> windows()
> Error: could not find function "windows"
> Execution halted
>
>
> On Sun, Sep 6, 2009 at 11:59 AM, RIOS,ALFREDO ARTURO<arios at ufl.edu>  
> wrote:
>> maybe
>>
>> windows()
>>
>>
>> On Sun Sep 06 12:53:14 EDT 2009, Peng Yu <pengyu.ut at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am wondering how to pop up the graphics window from Rscript. I run
>>> the following code, but I don't see the graphics window, even
>>> transiently.
>>>
>>> Regards,
>>> Peng
>>>
>>> $ Rscript plot.R
>>>>
>>>> x=1:10
>>>> y=1:10
>>>> plot(x,y)
>>>>
>>>
>>> ______________________________________________

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list