PoDDyHePoPlot: Plot Function Developed for PoDDy-Hepo Project

View source: R/PoDDyHePoPlot.R

PoDDyHePoPlotR Documentation

Plot Function Developed for PoDDy-Hepo Project

Description

It plots the prevalences against survey year.

Usage

PoDDyHePoPlot(
  data,
  year,
  grplabels = NULL,
  title,
  y_min,
  y_max,
  sepvarlbl = NULL
)

Arguments

data

A data frame from 'PoDDyHePoPool()'.

year

The maximum year in the observed data.

grplabels

The labels of grouping variable. By default, grplabels = NULL. In our case, grplabels = c("Men", "Women").

title

Title for the plot. It changes due to different response variable.

y_min

minimum value of y-axis(in percentage). For example, if 10 percent is the minimum value of y-axis, then type let y_min = 10.

y_max

maximum value of y-axis(in percentage). Let y_max = 75, if 75 percent is the maximum value of y-axis.

sepvarlbl

Labels of the variable whose proportion of each category has been calculated. The default is NULL. If it is NULL, the name of variable will then be like obe_0, obe_1, obe_2 take our case for example. If it is labelled, as the levels are sorted, please make sure that the labels are in right order.

Details

Description of PoDDyHePoPlot()

Enables plotting even there is a variable whose proportion of each category has been calculated.

Value

Returns a figure


zauziii/PoDDyHePo-projection documentation built on May 2, 2024, 3:48 a.m.