[R-SIG-Finance] I have a problem with zoo object
Brian G. Peterson
brian at braverock.com
Sat Feb 5 20:51:04 CET 2011
On 02/05/2011 01:31 PM, B. Jonathan B. Jonathan wrote:
> Hi all, can somebody correct me where I was wrong in following set of codes?
> I have a list where each element is zoo object and I want to call a
> particular zoo object through some assigned name, as follows:
>> List<- vector("list", length=2)
>> names(List)<- LETTERS[1:2]
>> List[]<- zooreg(rnorm(10), start=as.Date("2000-01-01"), frequency=1)
>> List[]<- zooreg(rnorm(20), start=as.Date("2000-01-01"), frequency=11)
>> namess<- "A"
>> window(List$namess, start=as.Date("2000-01-01"),
> Error in attr(x, "tsp")<- c(1, NROW(x), 1) :
> attempt to set an attribute on NULL
This is a general question that should have gone to R-help, not here.
you don't have a slot called 'namess'
You have a string called 'namess'
Please direct non-finance-specific queries to R-help in the future.
More information about the R-SIG-Finance