Learn R Programming

RclusTool (version 0.91.3)

abdPlotTabs: Abundances barplots inside Tk tabs.

Description

Display the abundances barplot of a clustering.

Usage

abdPlotTabs(clusterings, nb, RclusTool.env = initParameters(), hscale = 1.2)

Arguments

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.

Value

None

Details

abdPlotTabs displays the abundances barplot of a set of clusterings in Tk tabs of a notebook.

Examples

Run this code
# NOT RUN {
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, dir.save=tempdir())
method <- "K-means"

x <- computeUnSupervised(x, K=3, method.name=method)

abdPlotTabs(x$clustering, mainWindow$env$nb)
 

# }

Run the code above in your browser using DataLab