Skip to content
Back to formatted view

Raw Message

Message-ID: <20050329181030.95101.qmail@web60507.mail.yahoo.com>
Date: 2005-03-29T18:10:30Z
From: Hai Lin
Subject: follow up on "pairewise plots"

--- Dimitris Rizopoulos
<dimitris.rizopoulos at med.kuleuven.ac.be> 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.