numero.plot {Numero} | R Documentation |
Plot map colorings and save them as vector graphics
numero.plot(results, variables = NULL, elements = NULL, folder = NULL, reference = NULL, subplot = c(3,3), gain = 1, detach = FALSE, capacity = 90)
results |
A list object that contains the self-organizing map and its statistical colorings. |
variables |
A string vector that contains names of variables to show. |
elements |
The topology of a SOM with subgroup labels. |
folder |
Folder path for saving figures. |
reference |
Reference color ranges and scales. |
gain |
Modifier for overall color intensity. |
subplot |
A two-element vector that sets out the number of rows and columns for subplots per figure. |
detach |
Use detached windows for figures. |
capacity |
Maximum number of subplots to show on screen. |
The input results
must contain the output from
codenumero.evaluate() or similar.
The input argument elements
can be the topology of a SOM or with
additional columns as in the output from numero.subgroup()
.
The input argument reference
follows the output format from
numero.evaluate()
.
Possible values for detach
include "X11", "aqua", TRUE or FALSE.
Using multiple figures may result in different behaviour in terminal vs.
RStudio instances. The default behaviour is to create detached windows for each
figure when the X11 display server is available (e.g. in Linux). To use
detached windows in Mac, use the value "aqua". Setting detach = TRUE
will use a more general approach, however, some systems may behave
unpredictably. To create multiple figures that remain docked within the
RStudio work window, set detach = FALSE
.
The number of figures that were created.
Ville-Petteri Makinen
# 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. modl <- numero.create(data = trdata) # Evaluate map statistics for all variables. stats <- numero.evaluate(model = modl, data = dataset) # Plot map colorings. numero.plot(results = stats)