#load data
data(eset)
eset
#construct vars2test
survival <- matrix(c("Relapse","Months2Relapse"),ncol=2,byrow=TRUE)
colnames(survival) <- c('event','time')
#add positive to have more than one category
pData(eset)[1:20,'lymph.node.status'] <- 'positive'
vars2test <- list(survival=survival,categorical='lymph.node.status')
vars2test
#first half of the samples will be one cluster and the rest the other cluster
cluster <- c(rep('Cluster1',floor(ncol(eset)/2)),rep('Cluster2',ncol(eset)-floor(ncol(eset)/2)))
#test association
ClusterPhenoTest(eset,cluster,vars2test=vars2test)
Run the code above in your browser using DataLab