[R] cant find "get"?
John.Strumila at team.telstra.com
Fri Sep 1 01:55:25 CEST 2000
thanks heaps Thomas,
I played with substitute, eval and deparse but it would have taken me a
month of sundays to figure this one out. I'm still trying to understand
I reckon this R-list and it's contributors are great.
From: Thomas Lumley [mailto:thomas at biostat.washington.edu]
Sent: Friday, 1 September 2000 9:32
To: Strumila, John
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] cant find "get"?
On Fri, 1 Sep 2000, Strumila, John wrote:
> howdy gurus,
> I was wondering if someone could help me with what looks like a simple
> I found this great function called "get" which allows me to work out my
> object name at run time. Unfortunately it's not letting me assign values
> with it. What am I doing wrong?
> John Strumila
> > names(get(file.name))
>  "X14.59.23"
> > names(get(file.name)) <- "date"
> Error: couldn't find function "get<-"
What you want to do is
except that you would probably be better off just finding out what your
variable was called and using its name. This sort of double indirection
is just too complicated.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help