# NOT RUN {
#load test data
data(sim_profile);
#perform a group of re-sampling clustering experiments accepting default parameters
#for the clustering algorithms
cmr <- cluscomp(
sim_profile,
algorithms=list('kmeans','pam'),
merge=1,
clmin=2,
clmax=5,
reps=5
)
#display resulting matrices contained in the consensus result list
summary(cmr);
#display the cluster robusteness for the kmeans k=4 consensus matrix
clrob(cmr$e2_pam_k4);
#plot a heatmap of the consensus matrix, note you access the cluster matrix object
#through the cm slot
#heatmap(cmr$e2_pam_k4@cm);
#display the membership robustness for kmeans k=4 cluster 1
memrob(cmr$e2_pam_k4)$cluster1;
#merged consensus example
#data(testcmr);
#calculate the membership robustness for the merge matrix when cluster number k=4,
#in reference to the pam scaffold. (see memrob for more details).
#mr <- memrob(testcmr$merge_k4,testcmr$e1_kmeans_k4@rm);
#show the membership robustness for cluster 1
#mr$cluster1;
# }
Run the code above in your browser using DataLab