[R] Apply function

tedzzx zengzhenxing at gmail.com
Tue Nov 11 06:59:55 CET 2008


Hi all

I am manipulating a datafram which has 3 variables.Such as:

1  2  3
4  5  6
.  
.
.
200  210  300

I also has a row index: index=c(100,200,250..300)
I want to find the sums of first 100 rows, then the sum from row 101 to row
200, then row 201 to row 250... the each end row is indicated by the index.

Can I use the apply function to do that? or any other way?

Thanks

Ted


-- 
View this message in context: http://www.nabble.com/Apply-function-tp20434042p20434042.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list