I have data from three different experimental conditions, in two different modes, and I have computed and stored in a first data.frame the mean and sd for each condition for each mode. It looks like
t1 <- data.frame(condition = rep(c("A","B","C"),times=2),
mode = rep(c(1,2),each=3),
mean = rnorm(6),
sd = rnorm(6))
I then have computed for each pairwise comparison of conditions the mann-whitney rank-sum tests. The resulting data.frame looks like this:
t2 <- data.frame(mode = rep(c(1,2),each=3),
test = rep(c("AvB","AvC","BvC"),2),
pvalue = runif(6,0,0.2)
)
I would like to combine the two data.frames in a single data.frame with 'holes', that ofr each test shows the mode, the means of the conidtions actually tested, and the p-value. I have in mind something like this:
mode mean A mean B mean C test pvalue
1 1.34 1.12 A v B 0.067
1 1.34 0.98 A v C 0.021
1 1.12 0.98 B v C 0.345
I know that the resulting table has holes in it -- not so good for running stats on it -- but my aim is to create a .tex table (using xtable()) to show all the possible pairwise tests, and, at the same time, display the mean of the variable in each condition in each mode. This is for display in a paper appendix.
Thanks!