[R] sequential sum of a vector...

William Revelle lists at revelle.net
Wed Jul 23 17:32:01 CEST 2008

At 7:33 PM +0530 7/23/08, Shubha Vishwanath Karanth wrote:
>Hi R,
>I want to sum up first 8 elements of x, then again next 8 elements of x,
>then again another 8 elements..... So, my new vector should look like:
>I used:
>But without grouping, can I achieve the required? Any other ways of
>doing this?
>Thanks, Shubha



William Revelle		http://personality-project.org/revelle.html
Professor			http://personality-project.org/personality.html
Department of Psychology             http://www.wcas.northwestern.edu/psych/
Northwestern University	http://www.northwestern.edu/
Attend  ISSID/ARP:2009               http://issid.org/issid.2009/

More information about the R-help mailing list