# NOT RUN {
library(RFclust)
#Get GBM example data from the iCluster package, repackaged to maintain CRAN compatibility
data(gbm)
#Transpose so columns are samples and features are rows
gbm.t <- lapply(gbm, t)
#Make sure the sample names are the same across the matrices for the different
#samples - the code breaks otherwise
colnames(gbm.t[[2]]) <- colnames(gbm.t[[3]]) <- colnames(gbm.t[[1]])
#Run function on that dataset - these methods are computationally intensive
#so automatic testing during build has been disabled (takes > 5s).
#Users may test the software by running the code separately as the example is reproducible
# }
# NOT RUN {
Test.cluster <- RFCluster(Data = gbm.t, ClustAlg = "pam", MaxK = 5,
nTrees = 10, ProjectName = "RFCluster_Test", ClustReps = 50 , writeTable = FALSE, plot = NULL)
unlink("RFCluster_Test",recursive = TRUE)
# }
Run the code above in your browser using DataLab