Last data update: 2014.03.03

R: Clustering 2D-scatterplot
sctrR Documentation

Clustering 2D-scatterplot

Description

sctr generates a scatterplot from a binClst_instance, showing clusters in different colors.

Usage

sctr(obj, ...)

## S4 method for signature 'binClst'
sctr(obj, ref = NULL, showVars = NULL,
  showClst = NULL, bg = NULL, ...)

## S4 method for signature 'binClstStck'
sctr(obj, ref = NULL, showVars = NULL,
  showClst = NULL, ...)

Arguments

obj

A binClst_instance.

...

Parameters ref, showVars and showClst are optional.

ref

A numeric vector with expert/reference labelling for visual validation of the clustering.

A second binClst_instance to be compared with the former.

showVars

When the number of variables is greater than two, a length 3 numeric vector indicating one splitting variable and two variables to be scattered (given in that order).

showClst

When the number of variables is greater than two, a numeric vector (of variable length) indicating a subset of the clusters that will be shown in the scatter plot. This is usefull in case of overlapping clusters.

bg

A valid colour especification to be used as background colour for multivariate scatterplots. By default a light-grey colour is used to enhance data points visibility.

Examples

# -- apply EMbC to the example path --
mybcp <- stbc(expth,info=-1)
# -- show the scatterplot compared with expert labelling--
sctr(mybcp,expth$lbl)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(EMbC)
Loading required package: move
Loading required package: geosphere
Loading required package: sp
Loading required package: raster
Loading required package: rgdal
rgdal: version: 1.1-10, (SVN revision 622)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.11.3, released 2015/09/16
 Path to GDAL shared files: /usr/share/gdal/1.11
 Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
 Path to PROJ.4 shared files: (autodetected)
 Linking to sp version: 1.2-3 
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/EMbC/sctr.Rd_%03d_medium.png", width=480, height=480)
> ### Name: sctr
> ### Title: Clustering 2D-scatterplot
> ### Aliases: sctr sctr,binClst-method sctr,binClstStck-method
> 
> ### ** Examples
> 
> # -- apply EMbC to the example path --
> mybcp <- stbc(expth,info=-1)
[1]   0  -0.0000e+00       4       600
[1] ... Stable clustering
> # -- show the scatterplot compared with expert labelling--
> sctr(mybcp,expth$lbl)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>