Creates a histogram of the frequency with which different codes occur for categorical variables.

make_categorical_histogram(df, var, varname)

Arguments

df

A dataframe

var

The col.name drawn from df of the vector to be graphed

varname

A string containing the name of the column to be graphed. This is used only for labeling the graph, so alternative wording can be used if desired.

Value

A ggplot2 object containing the histogram for that column