segmented_barchart {regclass}R Documentation

Segmented barchart

Description

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

Usage

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.

Author(s)

Adam Petrie

References

Introduction to Regression and Modeling

Examples

  data(STUDENT)
	segmented_barchart(STUDENT$Family)  #Categorical variable
	data(TIPS)
	segmented_barchart(TIPS$PartySize)  #Numerical variable treated as categorical

	 

[Package regclass version 1.6 Index]