Re: [R] while loop until end of file

2010-08-29 Thread Joshua Wiley
Hi Marcel, Not quite sure what you want the while loop for. Does this do what you want? mydat <- read.table(textConnection(" Pair group param1 1 D 10 1 D 10 1 R 10 1 D 10 2 D 10 2

Re: [R] while loop until end of file

2010-08-29 Thread Bill.Venables
Eh? ## First calculate the means: mns <- with(alldata, tapply(param1, list(Pair, group), mean)) ## now put the results into a data frame res <- data.frame(mns, dif = mns[, "D"] - mns[, "R"]) ## Then write it out if that's your thing. -Original Message- From: r-help-boun...@r-projec