bar_error: Bar Plot with Error Bars (Standard Deviation or Standard...

View source: R/bar_error.R

bar_errorR Documentation

Bar Plot with Error Bars (Standard Deviation or Standard Error)

Description

Creates a bar plot of group means with error bars representing either the standard deviation (SD) or the standard error (SE).

Usage

bar_error(
  dataSet,
  vD,
  vI,
  variation = "sd",
  title = "Bar plot with error bars",
  label_y = "Y Axis",
  label_x = "X Axis"
)

Arguments

dataSet

A data.frame or tibble containing the data.

vD

A string indicating the name of the numeric dependent variable.

vI

A string indicating the name of the categorical independent variable (grouping variable).

variation

Type of variation to display: "sd" for standard deviation or "se" for standard error. Default is "sd".

title

Title of the plot. Default is "Bar plot with error bars".

label_y

Label for the Y-axis. Default is "Y Axis".

label_x

Label for the X-axis. Default is "X Axis".

Value

A ggplot object representing the plot.

Examples

data(d_e, package = "Analitica")
bar_error(d_e, vD = Sueldo_actual, vI = labor, variation = "sd")


Analitica documentation built on June 14, 2025, 9:07 a.m.