Skip to content
Back to formatted view

Raw Message

Message-ID: <49AFF3C1.6040308@pburns.seanet.com>
Date: 2009-03-05T15:46:09Z
From: Patrick Burns
Subject: character string as object name
In-Reply-To: <AAD1951F-DF63-435B-888F-87652B839DFB@gmail.com>

Does the first item on page 52 of 'The R Inferno'
explain it for you?  If not, can you give some
hints about how to improve the explanation?


Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of "The R Inferno" and "A Guide for the Unwilling S User")

Fuchs Ira wrote:
> Can someone please tell me why the following (last line) doesn't work 
> (as I expect it to :-)
>
> library(quantmod)
> a = getSymbols("MSFT",from="2009-3-01")
> a
> MSFT
> eval(as.name(a))
> MSFT$MSFT.Adjusted
> b=paste(a,'$MSFT.Adjusted',sep='')
> b
> eval(as.name(b))
>
> Why does this last line not work the way the earlier eval does?
>
> 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
> and provide commented, minimal, self-contained, reproducible code.
>
>