[R] "get" problem
bates at stat.wisc.edu
Wed Feb 24 23:36:42 CET 2010
On Wed, Feb 24, 2010 at 3:56 PM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> On 24/02/2010 4:31 PM, Georg Ehret wrote:
>> Dear R communtiy,
>> I do not understand why this does not work...:
>> > betaS$SBP
>>  0.03274 -0.04216 -0.08986 -0.45980 0.60320 -0.63070 -0.05682
>> > t<-c("betaS$SBP")
>> > t
>>  "betaS$SBP"
>> > get(t)
>> Error in get(t) : object 'betaS$SBP' not found
> The problem is that betaS$SBP is an expression that extracts a component of
> the betaS object, it's not the name of an object. get() only gets single
> objects, it doesn't evaluate expressions. You need something like
> to get what you want.
But if you have read
you may approach the problem differently.
P.S. I agree with Thomas, which may seem strange to anyone who has
read the nlme sources. :-)
>> [I am trying to use the variable "t" in a loop to call many different
>> objects, but the pasting together did not work and this simple example
>> not neither...]
>> Thank you and best regards, Georg.
>> Georg Ehret
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> 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.
More information about the R-help