segmented_barchart function

Segmented barchart

Segmented barchart

Produces a segmented barchart of the input variable, forcing it to be categorical if necessary

segmented_barchart(x)

Arguments

  • x: A vector. If numerical, it is treated as categorical variable in the form of a factor

Details

Standard segmented barchart. Shaded areas are labeled with the levels they represent, and the percentage of cases with that level is labeled on the axis to the right.

References

Introduction to Regression and Modeling

Author(s)

Adam Petrie

Examples

data(STUDENT) segmented_barchart(STUDENT$Family) #Categorical variable data(TIPS) segmented_barchart(TIPS$PartySize) #Numerical variable treated as categorical
  • Maintainer: Adam Petrie
  • License: GPL (>= 2)
  • Last published: 2020-02-21

Useful links