[R] (no subject)
Bert Gunter
gunter.berton at gene.com
Fri Jan 15 23:44:36 CET 2010
?Startup
Read this help page **carefully**. It tells you what happens when R starts
up. The profile file is executed with **only the base package loaded**, and
read.table is not in the base package.
If you replace your read statement with
data <- utils::read.table("data")
it would work (if there is a "data" file in the working directory. Otherwise
it will fail because it can't find "data"). (The use of the name "data" for
an R object is bad form, as Milton mentioned. But it is not the cause of
your problem).
Query to core team: As this seems to have come up several times recently,
should this be in the FAQ in a question like:
"Why can't R find the function called in my Profile file when R starts up?
(I'd be happy to write a first draft if so).
Bert Gunter
Genentech Nonclinical Biostatistics
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of milton ruser
Sent: Friday, January 15, 2010 2:07 PM
To: saleem mukhtar
Cc: r-help at r-project.org
Subject: Re: [R] (no subject)
Saleem,
I have no idea about this, but may be you can use other data.frame name
instead of "data" because data is a name of a function (see ?data).
good luck
milton
On Fri, Jan 15, 2010 at 3:33 PM, saleem mukhtar <saleem145 at yahoo.com> wrote:
> Hello,
>
> I am running R on cygwin for windows.
>
> File R1234 contains
>
> data <- read.table("data")
> q()
>
> On the command line I type
>
> R --no-save -q R_PROFILE=R1234
>
> returns
>
> Error: could not find function read.table
>
> THanks.
>
> ______________________________________________
> R-help at 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<http://www.r-project.org/posting
-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
More information about the R-help
mailing list