Prepare data to plot using plot_scatter_alignment_exposure()
Source: R/prep_scatter_alignment_exposure.R
prep_scatter_alignment_exposure.RdPrepare data to plot using plot_scatter_alignment_exposure()
Usage
prep_scatter_alignment_exposure(
data,
year,
region,
scenario,
group_var,
exclude_groups = "benchmark"
)Arguments
- data
data.frame. Holds net aggregated alignment metrics on the loan book level. Must contain columns:
"scenario","region","sector","year","exposure_weighted_net_alignment","sum_loan_size_outstanding"and any column implied bygroup_var.- year
Integer. Year on which
datashould be filtered.- region
Character. Region to filter
datadata frame on.- scenario
Character. Scenario to filter
datadata frame on.- group_var
Character. Vector of length 1. A column to group by. Must be available variables in
data.- exclude_groups
Character. Character specifying any values from
group_varthat should not be included in the analysis. This is useful to remove benchmarks that are not meant to be compared at the same level. Defaults to"benchmark".