Dear list members,

what is the reason that one obviously can't do arithmetic operations on
zoo members with different index positions?


   > require(zoo)
   > z <- zoo(c(1,1,1),order.by=c(1,2,3))
   > z
   1 2 3
   1 1 1
   > z[1]   + z[1]
   1
   2
   > z[1:2] + z[1:2]
   1 2
   2 2
   > z[1] + z[2]
   Data:
   numeric(0)

   Index:
   numeric(0)

______________________________________________
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