[R] RowSums Question

cameron raymond.fu at invesco.com
Thu Nov 18 18:58:09 CET 2010



I have a question on RowSums.  

Lets say i have a timeSeries table 
            A     B      C    
1/1/90   NA     1      1
1/2/90   NA     1      1
1/3/90   NA     1      1
1/4/90   NA     1      1
1/5/90    1      1      1
1/6/90    1      1      1

if i use RowSums, i will get

1/5/90    3
1/6/90    3


but i want

1/1/90   2
1/2/90   2
1/3/90   2
1/4/90   2
1/5/90   3
1/6/90   3

I cant figure out a way without doing loop.

Thanks
Cameron

-- 
View this message in context: http://r.789695.n4.nabble.com/RowSums-Question-tp3049261p3049261.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list