Skip to content
Prev 66678 / 398525 Next

pairewise plots

On Tuesday 29 March 2005 08:58, Hai Lin wrote:
Why would you want two columns with the same name?
If your data frame can be easily restructured (using reshape perhaps), 
one possible solution would be to use the lattice package:

require(lattice)
tmd(xyplot(c(A_CH1, B_CH1, C_CH1) ~ c(A_CH2, B_CH2, C_CH2) | gl(3, 4),
           dat, layout = c(3, 1)))

Note that 
1. This is with the data frame as it is, except that I assume the 
   last 2 columns are named C_CH1 and C_CH2
2. This plots the mean instead of the sum (but on the other hand, 
   it's a standard plot that way)

Deepayan