Re: [R] Mean of matched data

2012-07-18 Thread robgriffin247
got it... another merge did the trick narrow6<-merge(narrow2,narrow5,by=c("gene","gender")) Thanks for the help Rui -- View this message in context: http://r.789695.n4.nabble.com/Mean-of-matched-data-tp4636856p4636877.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Mean of matched data

2012-07-18 Thread robgriffin247
Thanks, in a way this has worked... with a slight modification to this: narrow3<-aggregate(narrow2$value~narrow2$gene+narrow2$gender,data=narrow2,mean) narrow4<-aggregate(narrow2$value~narrow2$gene+narrow2$gender,data=narrow2,sd) which gives a table of the 24000 gene&gender means (narro

Re: [R] Mean of matched data

2012-07-18 Thread Peter Ehlers
On 2012-07-18 04:27, Rui Barradas wrote: Helo, All problems should be easy. d <- read.table(text=" gene variable value gender line rep 1 CG1 X208.F1.30456 4.758010 Female 208 1 2 CG1 X365.F2.30478 4.915395 Female 365 2 3 CG1 X799.F2.30509 4.641636 Female 799 2 4 CG1 X306.M2.326

Re: [R] Mean of matched data

2012-07-18 Thread Rui Barradas
Helo, All problems should be easy. d <- read.table(text=" gene variable value gender line rep 1 CG1 X208.F1.30456 4.758010 Female 208 1 2 CG1 X365.F2.30478 4.915395 Female 365 2 3 CG1 X799.F2.30509 4.641636 Female 799 2 4 CG1 X306.M2.32650 4.550676 Male 306 2 5 CG1 X712.M2.3