Dear John, I belive your problem has to do with the sequence of startup. I think that .Rprofile is called before the required libraries are attached.
You might like to try putting your code into a .First() function and run it that way. Cheers, Andreas Dr Andreas Kiermeier Statistician SARDI FOOD SAFETY PROGRAM 33 Flemington Street Glenside SA 5065 Phone: +61 8 8207 7884 Fax: +61 8 8207 7854 Mobile: 0423 028 565 Email: [EMAIL PROTECTED] _____________________________ The information in this e-mail and attachments (if any) may be confidential and/or legally privileged. If you are not the intended recipient, any disclosure, copying, distribution or action taken is prohibited. SARDI, The South Australian Research and Development Institute, is the research division of Primary Industries and Resources (SA) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Fisler Sent: Thursday, 6 January 2005 09:21 To: [EMAIL PROTECTED]; John Fisler Subject: [R] Using the Rprofile file to automatically plot data on Startup of R version 2.0.1. 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 ______________________________________________ R-help@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 ______________________________________________ R-help@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