On Mon, 2 Aug 2010, Costas wrote:

Hi,

I have to zoo real valued time series "a" and "b" same length.

is index(a)<-index(b) same as time(a)<-time(b)?

Yes.

Which one is better?

Neither.

index() has been introduced because zoo series do not necessarily have to be indexed by "time". In such situations it might feel unnatural to use time().

Vice versa, when the data are indeed a time series, time() is more natural.

Internally in zoo functions, we typically use index. Personally, when doing time series calculations, I use time().

Best,
Z

______________________________________________
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