Re: [R] row-wise means

2009-11-18 Thread Peter Alspach
AYASTHA > Sent: Thursday, 19 November 2009 11:28 a.m. > To: r-help@r-project.org > Subject: [R] row-wise means > > I have a dataframe with 3 columns. The first column stores an > index. I would like to calculate the mean of the numbers > stored in each of the rest of the colu

[R] row-wise means

2009-11-18 Thread ANJAN PURKAYASTHA
I have a dataframe with 3 columns. The first column stores an index. I would like to calculate the mean of the numbers stored in each of the rest of the columns. So, here is my data matrix: col1 col2 col3 1 23 34 2 45 56 3 23 56 4 34 68 For each row I would like to calculate the means of the numbe