[R] Using the Rprofile file to automatically plot data on Startup of R version 2.0.1.

John Fisler john.fisler at latticesemi.com
Wed Jan 5 23:51:17 CET 2005


Dear R Help Members,

I have some R functions that plot semiconductor data.  I would like to 
automate these plots for individuals in our group such that they don't 
have to know R.  I have read the R help manuals and postings but have 
not found this problem.

I am using R version 2.0.1 under a Windows 2000 operating system.

The following is a simplified version of what I am tring to do:

If I insert the following R code in the Rprofile file located in 
directory 'C:\Program Files\R\rw2001\etc':

x <- c(1,2,3,4,5)
y <- c(2,5,6,3,10)
plot(x,y)

Using the Rgui.exe or the R.exe terminal version of R the following 
message appears:

Error: couldn't find function "plot"

If I copy and paste the command 'plot(x,y)' into the R Console Window 
the scatter plot appears in the R Graphics Device window as expected.

I have also tried putting the above code in a 'R' script file and using 
the source command but I get the same error message.

Any help would be appreciated.

Thank you.

John Fisler




More information about the R-help mailing list