[R] test

romzero romzero at yahoo.it
Sat Jan 15 00:12:45 CET 2011

Thank you all for the precious help.

Finally i could start the writing of a first part of my script, but now i
have a new question for you.

Need i to repeat the write.table portion for all the 15 lines or can i use a
"short cut"?


file.open <- "C:\\test.txt"
file.save <- "C:\\results.txt"

my.data <- read.table(file, header=T)

write.table(ddply(my.data, .(Thesis, Day), function(x){
        Baseline <- unlist(x[1, c("A", "B", "C")])
        data.frame(t(apply(x[-1, c("A", "B", "C")], 1, function(z){z -
}), file = file.save, row.names = F) 
write.table(ddply(my.data, .(Thesis, Day), function(x){
        Baseline <- unlist(x[2, c("A", "B", "C")])
        data.frame(t(apply(x[-1:-2, c("A", "B", "C")], 1, function(z){z -
}), file = file.save, append = T, row.names = F, col.names = F) 
etc etc

Thanks again for the help.

Best regards,
View this message in context: http://r.789695.n4.nabble.com/Comparison-of-numbers-in-a-table-tp3217329p3218524.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list