| plotICA {psichomics} | R Documentation |
Create multiple scatterplots from ICA
Description
Create multiple scatterplots from ICA
Usage
plotICA(ica, components = seq(10), groups = NULL, ...)
Arguments
ica |
Object resulting from performICA()
|
components |
Numeric: independent components to plot
|
groups |
Matrix: groups to plot indicating the index of interest of the
samples (use clinical or sample groups)
|
... |
Arguments passed on to pairsD3::pairsD3
groupa optional vector specifying the group each observation
belongs to. Used for tooltips and colouring the observations.
subsetan optional vector specifying a subset of observations
to be used for plotting. Useful when you have a large number of
observations, you can specify a random subset.
labelsthe names of the variables (column names of x
used by default).
cexthe magnification of the plotting symbol (default=3)
widththe width (and height) of the plot when viewed externally.
colan optional (hex) colour for each of the levels in the group
vector.
biga logical parameter. Prevents inadvertent plotting of huge
data sets. Default limit is 10 variables, to plot more than 10 set
big=TRUE.
themea character parameter specifying whether the theme should
be colour colour (default) or black and white bw.
opacitynumeric between 0 and 1. The opacity of the plotting
symbols (default 0.9).
tooltipan optional vector with the tool tip to be displayed when
hovering over an observation. You can include basic html.
leftmarspace on the left margin
topmarspace on the bottom margin
|
Value
Multiple scatterplots as a pairsD3 object
See Also
Other functions to analyse independent components:
performICA()
Examples
data <- scale(USArrests)
ica <- fastICA::fastICA(data, n.comp=4)
plotICA(ica)
# Colour by groups
groups <- NULL
groups$sunny <- c("California", "Hawaii", "Florida")
groups$ozEntrance <- c("Kansas")
groups$novel <- c("New Mexico", "New York", "New Hampshire", "New Jersey")
plotICA(ica, groups=groups)
[Package
psichomics version 1.20.2
Index]