color_by_dpmt: Visualizing professor ages by department

Description Usage Arguments Value See Also Examples

View source: R/color_by_dpmt.R

Description

This function creates a colored scatter plot with each color representing a different department. The index represents the order of the professors in the original data, since the original data is in alphabetical order, the index gives a sense of which letter the professor's last name starts with. A legend is included indicating which color represents which department. If there is no input, the scatter plot will have points from all 22 departments, with the oldest and youngest professors pointed out. If an input is given, the scatter plot will only contain points for the professors in the specified departments. If the input contains a string that is not a department, an error message will be printed. Note: the legend may overlap with the plot in some RStudio layouts, adjust the size of the plot area to default for clear graph.

Usage

1
color_by_dpmt(dpmt_displayed)

Arguments

dpmt_displayed

This input should include the names of the departments desired, in the form of a list

Value

a colored scatter plot of Williams faculty ages by department

See Also

plot_age for histogram of all ages, plot_by_dpmt for boxplots and histograms by department, plot_by_gender for boxplots and histograms by gender, and color_by_gender for colored scatter plot by gender

Other plotting.functions: color_by_gender, plot_age, plot_by_dpmt, plot_by_gender

Examples

1
2
color_by_dpmt()
color_by_dpmt(c('Theatre/Dance','Biology/Environmental Studies', 'Anthropology/Sociology'))

yz4/WilliamsFaculty documentation built on May 4, 2019, 8:47 p.m.