Internal helper function to plot one categorical density, to be called from
within plot_density.
plot_density_categorical(
dat,
y_var,
dat_highlightDiagonals = NULL,
weights_var = NULL,
xlab = NULL,
ylab = NULL
)Dataset with columns period and age and the
main variable specified through argument y_var.
Character name of the main variable to be plotted.
Optional dataset created by
create_highlightDiagonalData to highlight specific diagonals
in a density matrix.
Optional character name of a weights variable used to project the results in the sample to some population.
Optional plot annotations.