Re: [R] Calculateing means

2012-11-19 Thread S Ellison
> I have a data matrix with 570 columns containing 95 (samples) > with 6 replicates each. > How can I calculate the mean of the replicates for 95 samples? Write a function that calculates the sample means for a vector of 95 observations and then use apply() to apply that function to the whole

Re: [R] Calculateing means

2012-11-16 Thread arun
--- From: "Khan, Sohail" To: "'r-help@r-project.org'" Cc: Sent: Friday, November 16, 2012 4:42 PM Subject: Re: [R] Calculateing means Thanks. But aggregate will work on rows or columns.  I need to calculate mean for subsets of rows in a matrix I.E. Indx    x1   

Re: [R] Calculateing means

2012-11-16 Thread arun
l(res1)]<-i}  res1}  fun1(dat1,ids) #    1 2    3 #[1,] 23.3  9.67 42.7 #[2,] 43.0 53.00 24.0 #[3,] 26.7 50.67 27.3 #[4,] 22.0 44.33 28.0 A.K. - Original Message - From: "Khan, Sohail" To: "'r-h

Re: [R] Calculateing means

2012-11-16 Thread ilai
-Sohail > > > -Original Message- > From: John Kane [mailto:jrkrid...@inbox.com] > Sent: Friday, November 16, 2012 4:35 PM > To: Khan, Sohail; 'r-help@r-project.org' > Subject: RE: [R] Calculateing means > > ?aggregate will do it. > >

Re: [R] Calculateing means

2012-11-16 Thread Khan, Sohail
means for x1-x3, x4-x6, x7-x9 For each row. -Sohail -Original Message- From: John Kane [mailto:jrkrid...@inbox.com] Sent: Friday, November 16, 2012 4:35 PM To: Khan, Sohail; 'r-help@r-project.org' Subject: RE: [R] Calculateing means ?aggregate will do it. x <- data.frame(

Re: [R] Calculateing means

2012-11-16 Thread John Kane
ada > -Original Message- > From: skha...@nshs.edu > Sent: Fri, 16 Nov 2012 15:58:17 -0500 > To: r-help@r-project.org > Subject: [R] Calculateing means > > > Dear List, > > I have a data matrix with 570 columns containing 95 (samples) with 6 > replicates

[R] Calculateing means

2012-11-16 Thread Khan, Sohail
Dear List, I have a data matrix with 570 columns containing 95 (samples) with 6 replicates each. How can I calculate the mean of the replicates for 95 samples? Thank you. The information contained in this electronic e-mail transmission and any attachments are intended only for the use of the