Re: [R] how to add a 'label' column

2012-06-02 Thread Jason Love
Thanks all for the helpful tips. Jason On Sat, Jun 2, 2012 at 7:14 AM, Jim Lemon wrote: > On 06/02/2012 05:47 AM, Jason Love wrote: > >> Hello R users, >> I'd like to ask a question about how to add a new column. So, below is my >> situation. >> >> In order to perform the repeated ANOVA, I firs

Re: [R] how to add a 'label' column

2012-06-02 Thread Jim Lemon
On 06/02/2012 05:47 AM, Jason Love wrote: Hello R users, I'd like to ask a question about how to add a new column. So, below is my situation. In order to perform the repeated ANOVA, I first imported the following table. score=read.csv("patients_tests.csv"); subject test1 test2

Re: [R] how to add a 'label' column

2012-06-01 Thread Marc Schwartz
Just to throw out an alternative using the ?reshape function: # See the example using 'df3' on the help page DF.Long <- reshape(score, direction = "long", idvar = "subject", varying = 2:8, sep = "") > head(DF.Long, 24) subject timetest ab.1 ab1 0.17687 cl.1

Re: [R] how to add a 'label' column

2012-06-01 Thread Rui Barradas
Hello, Try score2$subject <- rep(score$subject, 7) Hope this helps, Rui Barradas Em 01-06-2012 20:47, Jason Love escreveu: Hello R users, I'd like to ask a question about how to add a new column. So, below is my situation. In order to perform the repeated ANOVA, I first imported the followi

[R] how to add a 'label' column

2012-06-01 Thread Jason Love
Hello R users, I'd like to ask a question about how to add a new column. So, below is my situation. In order to perform the repeated ANOVA, I first imported the following table. score=read.csv("patients_tests.csv"); subject test1 test2 test3 test4test5test6 test7 1