numero.subrgoup: Interactive subgroup assignment

numero.subgroupR Documentation

Interactive subgroup assignment


Plot self-organizing map colorings and let the user choose multi-district regions as subgroups


numero.subgroup(results, variables, topology = NULL, reference = NULL,
                gain = 1, detach = FALSE, capacity = 9, automatic = FALSE)



A list object that contains the self-organizing map and its statistical colorings.


A string vector that contains names of variables to show on screen.


A SOM topology or the output from a previous subgrouping session.


Reference color ranges and scales.


Modifier for overall color intensity.


Use a detached window.


Maximum number of subplots to show on screen.


If greater than zero, automatic segmentation of the map is triggered, the value sets the number of subgroups.


The input results must contain the output from numero.evaluate() or similar.

The input argument topology can be the structure of a SOM or with additional columns as in the output from nroPlot().

The input argument reference follows the output format from numero.evaluate().

Setting detach to FALSE will also clear all devices whenever the figure is refreshed. This may be inconvenient when using R from the terminal, for example; please see the help page of numero.plot() for using a detached window device instead.

If any districts are left unmarked, they are automatically collected into a subgroup of their own. If automatic is set, user input is skipped.


A data frame similar to the format returned by nroPlot().


# Import data.
fname <- system.file("extdata", "finndiane.txt", package = "Numero")
dataset <- read.delim(file = fname)

# Set identities and manage missing data.
dataset <- numero.clean(dataset, identity = "INDEX")

# Prepare training variables.
trvars <- c("CHOL", "HDL2C", "TG", "CREAT", "uALB")
trdata <- numero.prepare(data = dataset, variables = trvars)

# Create a self-organizing map.
sm <- numero.create(data = trdata)
qc <- numero.quality(model = sm)

# Evaluate map statistics for all variables.
stats <- numero.evaluate(model = qc, data = dataset)

# Define subgroups, uncomment to launch interactive window.
#elem <- numero.subgroup(results = stats, variables = trvars)

Numero documentation built on Aug. 8, 2022, 9:05 a.m.