# Generate imprinting probabilities for one country and year
imprinting_df <- get_imprinting_probabilities(
observation_years = 1920,
countries = "Aruba"
)
plot_one_country_year(imprinting_df)
# If we generate probabilities for more than one country and year,
imprinting_df <- get_imprinting_probabilities(
observation_years = c(1922, 1925),
countries = c(
"Algeria",
"South Africa"
)
)
# The default is to plot the first country year in the outputs
plot_one_country_year(imprinting_df)
# Or, specify a country and year of interest (both must exist in the
# imprinting_df).
plot_one_country_year(imprinting_df,
country = "South Africa",
year = 1925
)
Run the code above in your browser using DataLab