plot_cumulative_distribution: Plot Cumulative Distribution

View source: R/plot_cumulative_distribution.R

plot_cumulative_distributionR Documentation

Plot Cumulative Distribution

Description

Plots a cumulatative distribution of MUAC or an anthropometric index.

Usage

plot_cumulative_distribution(
  df,
  index,
  flags,
  grouping = NULL,
  file_path = NULL,
  wdth = NULL,
  hght = NULL,
  title_name = NULL
)

Arguments

df

A data frame with MUAC data, each row is 1 child.

index

Inputs a character value for which anthropometric index to plot. Use 'wfhz' for weight-for-height, 'hfaz' for height-for-age, 'wfaz' for weight-for-age, 'mfaz' for MUAC-for-age, or 'muac' for MUAC.

flags

Inputs a character value of 'yes' or 'no'. Yes specifies to include flagged values in the plot. No specifies to exclude flagged values in the plot.

grouping

Inputs an optional character value to facet the plot by.#' @return Returns a ggplot cumulative distribution plot of MUAC measurements.

file_path

Inputs an optional character value specifying the file path location to save an image of the plot. Recommended to specify as a .jpg or .png file.

wdth

Inputs an optional numeric value for the width of the image.

hght

Inputs an optional numeric value fo the height of the image.

title_name

Inputs an optional character value for the title of the plot.

Examples

## Not run: plot_cumulative_distribution(df, index = "muac", flags = "yes", grouping = "enum")

SaeedR1987/healthyr documentation built on July 4, 2023, 11:17 p.m.