View source: R/plot_zscore_distribution.R
plot_zscore_distribution | R Documentation |
Plot the distribution of an anthropometric z-score in order to visualize assess the distribution against a normal Gaussian curve.
plot_zscore_distribution(
df,
index,
flags,
grouping = NULL,
file_path = NULL,
wdth = NULL,
hght = NULL,
title_name = NULL
)
df |
Inputs a dataframe with anthropometric z-scores that has already been processed and standardized by the healthyr::format_nut_health_indicators function. |
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, or 'mfaz' for MUAC-for-age. |
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. |
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. |
Returns a ggplot2 object.
## Not run: plot_zscore_distribution(df, index = "wfhz", file_path = "myplots/wfhz_plot.jpg",
wdth = 10, hght = 8, title_name = "Distribution of WFH Z-scores, County X")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.