hist_2D_variables: Plot 2d histogram with multiple variables as specified by...

View source: R/plotting_functions.R

hist_2D_variablesR Documentation

Plot 2d histogram with multiple variables as specified by typically the break_out in digit tests. If data is row style, rownames would be the categories, and colnames would be x values.

Description

Plot 2d histogram with multiple variables as specified by typically the break_out in digit tests. If data is row style, rownames would be the categories, and colnames would be x values.

Usage

hist_2D_variables(
  data,
  data_style = "row",
  xlab = "Digits",
  ylab = "Frequency",
  title = "Multi-variable 2D Barplot",
  abline = NA
)

Arguments

data

The 2D dataframe to be plotted.

data_style

The style of input data. ggplot requires columns to be the arrays for x values, y values, etc.

  • If data has a row for y values, pass in 'row'.

  • If data has a column for y values, pass in 'col'.

  • Defaulted to 'row'.

xlab

x-axis label. Defaulted to 'digits'.

ylab

y-axis label. Defaulted to 'frequency'.

title

Plot title. Defaulted to '2D Histogram'.

abline

A ggplot2::geomline() instance that specifies the line to be addded onto the 2D barplot.

Value

A ggplot instance.


jlederluis/digitanalysis documentation built on Nov. 5, 2023, 11:46 a.m.