abdPlotTabs: Abundances barplots inside Tk tabs.

Description Usage Arguments Details Value Examples

View source: R/sampleView.R

Description

Display the abundances barplot of a clustering.

Usage

1
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.

Details

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

Value

None

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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)
 

RclusTool documentation built on Feb. 4, 2020, 5:08 p.m.