Learn R Programming

prettyGraphs (version 1.0)

contributionBars: contributionBars

Description

Produces bar charts for multivariate analyses. Plots the contribution to the variance from each data point for upwards of two axes (components).

Usage

contributionBars(factor_scores, contributions, x_axis = 1, y_axis = 2, col = NULL, main = "", upper = "blue", lower = "red", important = NULL, threshold = 0, sortContributions = TRUE)

Arguments

factor_scores
The factor scores, or x- and y-axis points of a data set.
contributions
The amount of contribution to the variance (between 0-1) by each data point.
x_axis
Which axis is the x-axis? Default is 1.
y_axis
Which axis is the y-axis? Default is 2.
col
A single-column matrix of colors for each data point.
main
A title to be placed at the top of the graph.
upper
The color used to identify the upper bound items that contribute above average variance.
lower
The color used to identify the lower bound items that contribute above average variance.
important
NOT CURRENTLY USED. A place holder for future versions.
threshold
A threshold (between 0-1) to draw upper and lower bounds for important items. Default is 1/number of items.
sortContributions
boolean, if TRUE, items will be sorted by contribution. if FALSE, items will appear in their row order.