abdPlotTabs | R Documentation |
Display the abundances barplot of a clustering.
abdPlotTabs(clusterings, nb, RclusTool.env = initParameters(), hscale = NULL)
clusterings |
clustering list. |
nb |
a notebook. |
RclusTool.env |
environment in which all global parameters, raw data and results are stored. |
hscale |
numeric value corresponding to the horizontal scale of graphic. |
abdPlotTabs displays the abundances barplot of a set of clusterings in Tk tabs of a notebook.
None
dat <- rbind(matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 4, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 6, sd = 0.3), ncol = 2))
colnames(dat) <- c("x","y")
tf <- tempfile()
write.table(dat, tf, sep=",", dec=".")
mainWindow <- tktoplevel()
tktitle(mainWindow) <- "Barplot clustering"
mainWindow$env$nb <- tk2notebook(mainWindow, tabs = c())
tkpack(mainWindow$env$nb, fill="both", expand= TRUE)
x <- importSample(file.features=tf)
method <- "K-means"
x <- computeUnSupervised(x, K=3, method.name=method)
abdPlotTabs(x$clustering, mainWindow$env$nb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.