[R] Question about subsetting data

From: William Pepe <williampepe_at_hotmail.com>
Date: Tue, 03 Jun 2008 20:35:00 -0400

I have a data set(Bill) of with 1 variable (var1), with 100 obs that are in ascending order. I want to sample every 10 observations and save them in 10 different groups such as  

  Group1 is obs 1-10
  Group 2 is obs-11-20  

and so on.  

First step is to subset them into the 10 groups, then calculate the mean of var1 for each of the 10 groups. Any help would be appreciated. Thanks.  


sh_skydrive_062008

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 04 Jun 2008 - 00:38:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 04 Jun 2008 - 02:30:36 GMT.

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

list of date sections of archive