--- Dimitris Rizopoulos
<[EMAIL PROTECTED]> wrote:
> you could try something like this:
> 
> dat <- array(sample(24), dim=c(4,2,3))
> par(mfrow=c(3,1))
> apply(dat, 3, function(x) plot(rowSums(x),
> x[,2]-x[,1]))

##

Thank you all for the inputs. It's great of help. 

The above solution also opens my mind that I could
convert my data to an array. 

dat <- data.frame(matrix(sample(24), nrow=4))
dimnames(dat) <-list(rownames=c('g1','g2','g3','g4'),
colnames=c("A_CH1","A_CH2","B_CH1","B_CH2","C_CH1","C_CH2"))

Sorry for the typo. (C_CH1, C_CH2)

dat2 <- array(unlist(dat), dim=c(4,2,3))  
and then plot them using Dimitris' solution.

Other statements of converting form are welcomed...

Thanks again.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to