Dear all,

I have a list , and I want to get all indexes ( dates ) of xts objects  in one 
list:

foo<-list(A = xts(seq(2),seq(Sys.Date(),Sys.Date()+2,length.out=2)), B = 
xts(seq(1),seq(Sys.Date()-2,Sys.Date()-1,length.out=1)) )

> foo
$A
           [,1]
2014-10-31    1
2014-11-02    2

$B
           [,1]
2014-10-29    1

lapply(foo, function(x) index(x))      gives A and B values separately . I want 
to get one list like :

"2014-10-31" "2014-11-02" "2014-10-29"

Thanks a lot.

______________________________________________
R-help@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.

Reply via email to