# roxygen generated flag
options(R_CHECK_RUNNING_EXAMPLES_=TRUE)
# generate a synthetic dataset with known classes
n <- 20; counts <- c(5, 2, 3);
V <- syntheticNMF(n, counts)
# perform multiple runs of one algorithm (default is to keep only best fit)
res <- nmf(V, 3, nrun=3)
res
# plot a heatmap of the consensus matrix
consensusmap(res)
# perform multiple runs of one algorithm (keep all the fits)
res <- nmf(V, 3, nrun=3, .options='k')
res
Run the code above in your browser using DataLab