MBplotVars {MBAnalysis}R Documentation

Customizable plots of variables related information

Description

Plots variables related information of MBPCA, ComDim, MBPLS or MBWCov with several options of customization.

Usage

MBplotVars(
  res,
  axes = c(1, 2),
  which = ifelse(res$call$scale, "correlation", "loading"),
  block = 0,
  select = 0,
  title = NULL,
  size = 2.25
)

Arguments

res

An object resulting from MBPCA, ComDim, MBPLS or MBWCov.

axes

Which dimensions should be plotted?

which

Either "correlation" or "loading".

block

Selection of variables by blocks. A number or integer, possibly a vector, corresponding to the index of the blocks from which the variables should be plotted. For MBPLS and MBWCov the Y response block corresponds to the index length(res$call$size.block)+1. By default, all variables of all blocks are plotted. Only one of block and select can differ from 0 (the default) both at the same time.

select

Selection of variables by index. A number or integer, possibly a vector, corresponding to the index of the variables that should be plotted. For MBPLS and MBWCov the Y variables index start from ncol(res$call$X)+1. By default, all variables of all blocks are plotted. Only one of block and select can differ from 0 (the default) both at the same time.

title

An optional title to be added to the plot.

size

The overall size of labels, points, etc.

Value

The required plot.

See Also

plot.MBPCA plot.ComDim plot.MBPLS plot.MBWCov

Examples

# Unsupervised example

data(ham)
X=ham$X
block=ham$block
res.mbpca <- MBPCA(X,block, name.block=names(block))
MBplotVars(res.mbpca)

# Supervised example

data(ham)
X=ham$X
block=ham$block
Y=ham$Y
res.mbpls <- MBPLS(X, Y, block, name.block=names(block))
MBplotVars(res.mbpls)


[Package MBAnalysis version 2.0.2 Index]