Re: [R] summarizing a dataset on a factor

2014-03-27 Thread Tom Wright
- > David L Carlson > Department of Anthropology > Texas A&M University > College Station, TX 77840-4352 > > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Tom Wrig

Re: [R] summarizing a dataset on a factor

2014-03-27 Thread David Carlson
un...@r-project.org] On Behalf Of Tom Wright Sent: Thursday, March 27, 2014 3:48 PM To: r-help@r-project.org Subject: [R] summarizing a dataset on a factor Hi all, I've spent too long in matlab land recently and seem to have forgotten my R skillz ;-) I'm sure I'm missing a simple wa

[R] summarizing a dataset on a factor

2014-03-27 Thread Tom Wright
Hi all, I've spent too long in matlab land recently and seem to have forgotten my R skillz ;-) I'm sure I'm missing a simple way to do this... Given a data frame id<-rep(1:5,2) eye<-c(rep('l',5),rep('r',5)) age<-rep(round(runif(5,0,12)),2) response<-round(runif(10,1,10)*10)/10 response2<-sample(c(