The .Rprofile file is processed before all the standard packages are loaded, that is why you are seeing the error. If you instead run the command as utils::read.csv or use library or require to manually load the utils package before calling read.csv then everything should work for you.
On Mon, Jun 23, 2014 at 11:42 AM, Christofer Bogaso <bogaso.christo...@gmail.com> wrote: > Hi again, > > I am trying to build a procedure such that whenever R starts, it will > read some CSV file. > > Therefore I put a code sometime like 'read.csv(...)' in my Rprofile > file. However if I put this function there then I am getting an error > saying 'Error: could not find function "read.csv"', whenever R starts. > > So is it the case that, read.csv() function will not work if it put to > run with Rprofile file? > > I got similar error with flush.console() function as well. > > Can someone tell me how I can achieve that? My goal is to read some > CSV file on startup of R. > > Thanks for your pointer. > > ______________________________________________ > 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 > and provide commented, minimal, self-contained, reproducible code. -- Gregory (Greg) L. Snow Ph.D. 538...@gmail.com ______________________________________________ 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 and provide commented, minimal, self-contained, reproducible code.