Learn R Programming

BAwiR (version 1.3.4)

get_pop_pyramid: Population pyramid

Description

This is the code to get a population pyramid with the number of both Spanish and foreigner players along the seasons for the ACB league. This aids in discussion of nationality imbalance.

Usage

get_pop_pyramid(df, title, language)

Value

Graphical device.

Arguments

df

Data frame that contains the ACB players' nationality.

title

Title of the plot

language

String, "eng" for English labels; "esp" for Spanish labels.

Author

Guillermo Vinue

Examples

Run this code
if (FALSE) {
 # Load the data_app_acb file with the ACB games 
 # from seasons 1985-1986 to 2017-2018:
 load(url("http://www.uv.es/vivigui/softw/data_app_acb.RData"))
 title <- " Number of Spanish and foreign players along the ACB seasons \n Data from www.acb.com"
 get_pop_pyramid(data_app_acb, title, "eng")
}

Run the code above in your browser using DataLab