View source: R/plot_combined_deaths_exposures.R
plot_combined_deaths_exposures | R Documentation |
This function constructs a graph (ggplot) of the combined male and female deaths
over the different countries (Country
). The same is done for the combined exposures.
On top of that a dotted line is added to show the deaths and exposures for the country
of interest (CountrySPEC
).
plot_combined_deaths_exposures(Country, CountrySPEC, data_M, data_F)
Country |
The vector of countries. |
CountrySPEC |
The country of interest. |
data_M |
The male mortality data, containing the deaths and exposures for each country. |
data_F |
The female mortality data, containing the deaths and exposures for each country. |
The input parameters data_M
and data_F
must be (in the same format as)
the output of the function get_mortality_data()
.
## Not run: xv <- 0:90 yv <- 1970:2018 yvSPEC <- 1970:2018 username <- "" password <- "" Country <- c("FR", "BE", "NL", "LU") CountrySPEC <- "BE" data <- get_mortality_data(xv, yv, yvSPEC, Country, CountrySPEC, username, password) data_M <- data$M data_F <- data$F plot_combined_deaths_exposures(Country, CountrySPEC, data_M, data_F) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.