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:
> library(zoo)
> List <- vector("list", length=2)
> names(List) <- LETTERS[1:2]
> List[[1]] <- zooreg(rnorm(10), start=as.Date("2000-01-01"), frequency=1)
> List[[2]] <- zooreg(rnorm(20), start=as.Date("2000-01-01"), frequency=11)
> #List
> namess <- "A"
> window(List$namess, start=as.Date("2000-01-01"),
end=as.Date("2000-01-01"))
Error in attr(x, "tsp") <- c(1, NROW(x), 1) :
attempt to set an attribute on NULL
Thanks for your time.
[[alternative HTML version deleted]]
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.