custombar: custombar

Description Usage Arguments Value Examples

View source: R/custombar.R

Description

Bar plot with customized title and labels. Y-Axis limits are fixed according to the range of the values in X.

Usage

1
custombar(X, iobs, plotname = "", ylabelname = "Contribution", xlabelname = "")

Arguments

X

matrix with observations as row vectors.

iobs

index of the observations whose value will be displayed.

plotname

string with the title of the plot. Set to "" by default.

ylabelname

string with the y-axis label. Set to "Contribution" by default.

xlabelname

string with the y-axis label. Set to "" by default.

Value

ggplot object with the values of a vector with a customized geom_col layer.

Examples

1
2
3
4
X <- as.matrix(X)
custombar(X, 2)
custombar(X, 2, plotname = "Observation 2", ylabelname = bquote(x.["j"]), 
xlabelname= "Variables")

albagc/SCOUTerRpack documentation built on Dec. 19, 2021, 12:23 a.m.