[R] Reading CSV file every time when R starts
bogaso.christofer at gmail.com
Mon Jun 23 19:51:07 CEST 2014
Thanks for your prompt reply. I have added 'library(utils)' in my
Rprofile file and now it is working fine.
Thanks and regards,
On Mon, Jun 23, 2014 at 11:34 PM, Greg Snow <538280 at gmail.com> wrote:
> 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.christofer at 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 at r-project.org mailing list
>> 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.
> 538280 at gmail.com
More information about the R-help