###################################################
### chunk number 1: 
###################################################
library(copa)
library(colonCA)
data(colonCA)
head(pData(colonCA), 10)


###################################################
### chunk number 2: 
###################################################
rslt <- copa(colonCA, as.numeric(pData(colonCA)[,3]))


###################################################
### chunk number 3:  eval=FALSE
###################################################
## plotCopa(rslt, idx = 1, col = c("lightgreen","salmon"))


###################################################
### chunk number 4: 
###################################################
plotCopa(rslt, idx = 1, col = c("lightgreen","salmon"))


###################################################
### chunk number 5: 
###################################################
tableCopa(rslt)


###################################################
### chunk number 6: 
###################################################
summaryCopa(rslt, 9)


###################################################
### chunk number 7: 
###################################################
prm <- copaPerm(colonCA, rslt, 9, 24)
sum(prm >= 9)


