viz_contributions: Visualize Contributions and cos2

viz_contributionsR Documentation

Visualize Contributions and cos2

Description

Plots contributions histogram and cos^2 scatterplot.

Usage

viz_contributions(x, ...)

viz_cos2(x, ...)

## S4 method for signature 'MultivariateAnalysis'
viz_contributions(
  x,
  ...,
  margin = 2,
  axes = 1,
  sort = TRUE,
  decreasing = TRUE,
  limit = 10,
  horiz = FALSE,
  col = "grey90",
  border = "grey10"
)

## S4 method for signature 'MultivariateAnalysis'
viz_cos2(
  x,
  ...,
  margin = 2,
  axes = c(1, 2),
  active = TRUE,
  sup = TRUE,
  sort = TRUE,
  decreasing = TRUE,
  limit = 10,
  horiz = FALSE,
  col = "grey90",
  border = "grey10"
)

Arguments

x

A CA, MCA or PCA object.

...

Extra parameters to be passed to graphics::barplot().

margin

A length-one numeric vector giving the subscript which the data will be returned: 1 indicates individuals/rows (the default), 2 indicates variables/columns.

axes

A numeric vector giving the dimensions to be plotted.

sort

A logical scalar: should the data be sorted?

decreasing

A logical scalar: should the sort order be decreasing? Only used if sort is TRUE.

limit

An integer specifying the number of top elements to be displayed.

horiz

A logical scalar: should the bars be drawn horizontally with the first at the bottom?

col, border

A character string specifying the bars infilling and border colors.

active

A logical scalar: should the active observations be plotted?

sup

A logical scalar: should the supplementary observations be plotted?

Value

viz_contributions() and viz_cos2() are called for their side-effects: they result in a graphic being displayed. Invisibly return x.

Author(s)

N. Frerebeau

See Also

Other plot methods: biplot(), screeplot(), viz_individuals(), viz_variables(), viz_wrap, wrap

Examples

## Load data
data("iris")

## Compute principal components analysis
X <- pca(iris, scale = TRUE)

## Get row contributions
head(get_contributions(X, margin = 1))

## Plot contributions
viz_contributions(X)

## Plot cos2
viz_cos2(X)

dimensio documentation built on Nov. 25, 2023, 1:08 a.m.