Description Usage Arguments Details See Also Examples
View source: R/discouraged_functions.R
(Discouraged function. Please use plotBarGrouped()
instead.)
1 2 3 4 5 6 7 | plotAge(
.data,
xvar = "XLabel",
yvar = "YValue",
fill_color1 = "#65B32E",
ytitle = "Rate"
)
|
.data |
dataframe containing the variables to plot |
xvar |
character string, name of the variable to plot on the x-axis in quotes
(default |
yvar |
character string, name of the variable to plot on the y-axis in quotes
(default |
fill_color1 |
character string, hexadecimal colour to use in the graph;
(default to ECDC green |
ytitle |
character string, y-axis title; (default |
This function draws a bar graph by age group (or possibly other grouping).
The bar graph presents the distribution of cases at EU/EEA level
using the rate per 100 000 cases by age.
Expects aggregated data.
Global function: getAgeGender
Internal function: EcdcColors
Required Packages: ggplot2
1 2 3 4 5 6 7 8 9 | # --- Create dummy data
mydat <- data.frame(AgeGroup = c("0-25", "26-65", "65+"),
NumberOfCases = c(54,32,41))
# --- Plot the dummy data
plotAge(mydat,
xvar = "AgeGroup",
yvar = "NumberOfCases",
ytitle = "Number of cases")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.