[R] Means from selected columns in a data frame

2010-07-20 Thread Marcus Drescher
Hi all, I have a dataframe with survey data. Now I want to calculate means from several but not all columns (e.g. a1, a2, a3) and save them in a new separate column (e.g. a). Like: a = mean(a1, a2, a3) Can someone help me or give me the right key word to look for? Thanks

Re: [R] Means from selected columns in a data frame

2010-07-20 Thread David Winsemius
On Jul 20, 2010, at 9:13 AM, Marcus Drescher wrote: Hi all, I have a dataframe with survey data. Now I want to calculate means from several but not all columns (e.g. a1, a2, a3) and save them in a new separate column (e.g. a). Well that would be possible unless you are in Minitab or

Re: [R] Means from selected columns in a data frame

2010-07-20 Thread David Winsemius
On Jul 20, 2010, at 9:25 AM, David Winsemius wrote: On Jul 20, 2010, at 9:13 AM, Marcus Drescher wrote: Hi all, I have a dataframe with survey data. Now I want to calculate means from several but not all columns (e.g. a1, a2, a3) and save them in a new separate column (e.g. a). Well