Description Usage Arguments Value Examples
Plot the distribution of the age for a person based on name.
1 2 3 |
names |
First names as a character vector. Names are case insensitive. |
base_year |
Year that the age is calculated as of. |
age_range |
Limit the range of possible ages that the name could come from. This could be useful if you know, for example, that the name is of an adult. If missing, all ages will be considered. |
type |
Whether to plot age or year on the x-axis. |
alive_geom |
Choice of whether to plot as an area or bar chart. |
facet_scales |
Passed to the |
fill_color |
The color that the number alive gets filled in as. |
line_color |
The color that the number born is colored. |
A ggplot2
object. It will have one facet per unique name.
1 2 | plot_nameage(c("Anna", "Joseph"), type = "age")
plot_nameage(c("Anna", "Joseph"), type = "year")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.