[R] fMultivar rollMax question

From: Omar Lakkis <uofiowa_at_gmail.com>
Date: Thu 06 Jul 2006 - 04:06:40 EST


I am using fMultivar under R 2.2.1 on a Debian linux box. Could someone, please, explain to me why there are two trailing NAs in the last statement in the code beow?

> library(fMultivar)
> x <- 1:20
> rollMax(x, n=3)

 [1] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
> rollMax(x, n=2)

 [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
> rollMax(x, n=1)

 [1] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 NA NA
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 06 05:37:01 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 06 Jul 2006 - 06:21:24 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.