This function creates a visualization for categorical data using ggplot2. It takes a dataset and a column name, generates a frequency table for the categorical data, and plots the frequencies.

plotCategoricalData(datatoplot, columnName)

Arguments

datatoplot

A data frame containing the dataset to be plotted.

columnName

The name of the column in the dataset that contains categorical data.

Value

A ggplot object representing the frequency of each category in the specified column.

Examples

# plotCategoricalData(myData, "myCategoryColumn")