[R] adding zeroes after old zeroes in a vector ??

skan juanpide at gmail.com
Sat Sep 11 01:25:56 CEST 2010


Hi

z shifting:
c(1,z[-length(z)])
then for N=1
tmp <- c(1,z[-length(z)])*z
or
c(1,z[-length(z)])&&z

length of the vector
1000000
(Indeed is more complicated because I need to use the result of all this
with zoo time series)
Typical N
10 to 400
typical number of zeros 
10%

I'll try all your new suggestions
-- 
View this message in context: http://r.789695.n4.nabble.com/adding-zeroes-after-old-zeroes-in-a-vector-tp2534824p2535224.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list