Frequency Distribution of Qualitative Data
The frequency distribution of a data variable is a summary of the data occurrence in a collection of non-overlapping categories.
Example
In the data set painters, the frequency distribution of the School variable is a summary of the number of painters in each school.
Problem
Find the frequency distribution of the painter schools in the data set painters.
Solution
We apply the table function to compute the frequency distribution of the School variable.
> school = painters$School # the painter schools
> school.freq = table(school) # apply the table function
Answer
The frequency distribution of the schools is:
Enhanced Solution
We apply the cbind function to print the result in column format.
Exercise
- Find the frequency distribution of the composition scores in painters.
- Find programmatically the school that has the most painters.