Skip to contents

Creates a line plot showing the reduction in a specified risk factor under intervention over time.

Usage

riskfactors_diff(
  riskft_diff,
  data_weighted_rf_wide_collapse,
  scale_y_continuous_limits = NULL,
  scale_y_continuous_breaks = ggplot2::waiver(),
  scale_y_continuous_labels = ggplot2::waiver()
)

Arguments

riskft_diff

A character string specifying the difference in risk factor to plot. Options are: "bmi", "ei", "obesity", "sodium".

data_weighted_rf_wide_collapse

A data frame with differences between intervention and baseline values for risk factors.

scale_y_continuous_limits

A numeric vector specifying the limits of the scales for continuous y aesthetics.

scale_y_continuous_breaks

A numeric vector specifying the breaks of the scales for continuous y aesthetics.

scale_y_continuous_labels

A numeric vector specifying the labels of the scales for continuous y aesthetics.

Value

A ggplot object representing the specified plot.