plotAllLineagesByLocation: Plot prevalence of lineages by location

View source: R/plotAllLineagesByLocation.R

plotAllLineagesByLocationR Documentation

Plot prevalence of lineages by location

Description

Plot prevalence of all lineages above a specified frequency over time by location

Usage

plotAllLineagesByLocation(
  location,
  other_threshold = 0.05,
  nday_threshold = 10,
  ndays = 180,
  other_exclude = NULL,
  cumulative = FALSE,
  include_title = TRUE
)

Arguments

location

a location name

other_threshold

minimum prevalence threshold below which lineages are accumulated under "Other" (default=0.05)

nday_threshold

minimum number of days in which the prevalence of a lineage must be below other_threshold to be accumulated under "Other" (default=10)

ndays

the number of days before the current date to be used as a window to accumulate lineages under "Other" (default=180)

other_exclude

(optional) lineage(s) that are NOT to be included under "Other" even if the conditions specified by the three thresholds above are met

cumulative

'Boolean' (T/F), T returns cumulative prevalence of lineages (default=F)

include_title

'Boolean' (T/F), T returns plot with title, F returns plot without title (default=F)

Value

ggplot2 object

Examples

plotAllLineagesByLocation(location = "India", other_threshold=0.03, ndays=60)


outbreak-info/R-outbreak-info documentation built on March 2, 2023, 9:58 a.m.