generate_enrolment_hist: Create a histogram that represents the distribution of values...

View source: R/plots.R

generate_enrolment_histR Documentation

Create a histogram that represents the distribution of values in 'col2' for each category in 'col1'

Description

Red bars indicate health facilities which are far below the lower target. Orange bars indicate health facilities which are above the lower target, but below the upper target. Green bars indicate health facilities which are above the upper target.

Usage

generate_enrolment_hist(df, col1, col2, lthres, uthres, lblx, lbly)

Arguments

df

Data frame to use for the plot

col1

Column name in data frame 'df'

col2

Column name in data frame 'df' that contains numeric values

lthres

Numeric value, lower threshold

uthres

Numeric value, upper threshold

lblx

Label of the x-axis

lbly

Label of the y-axis

Value

This function returns a ggplot object which contains a histogram representing the distribution of values in 'col2' for each category in 'col1'.


Thaliehln/timci documentation built on April 8, 2024, 3:38 p.m.