> Also, if we make days a list, the class attributes are kept when looping
> over the list, ie.
>
> days<- list( as.Date( c("2000-01-01", "2000-01-02") ) )

Do you realise that that's a list with length one?

I suspect you want

days <- as.list( as.Date( c("2000-01-01", "2000-01-02") ) )
for (day in days) {
  print(day)
}

Hadley


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
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