plotPrevalenceDotPlot: Plots a dot plot of prevalences of a variant in a specific...

View source: R/plotPrevalenceDotPlot.R

plotPrevalenceDotPlotR Documentation

Plots a dot plot of prevalences of a variant in a specific location

Description

Plots a dot plot of prevalences of a variant in a specific location

Usage

plotPrevalenceDotPlot(df, title = NULL, subtitle = NULL, dot_size = 3)

Arguments

df

Dataframe resulting from calling getCumulativeBySubadmin

title

(optional) Title to include on the plot

subtitle

(optional) Subtitle to include on the plot

dot_size

(optional) Dot plot size (in mm)

Examples


# Calculate the proportion of sequences assigned to BA.2 or BA.2.12.1 by U.S. State
prev_by_state = getCumulativeBySubadmin(pangolin_lineage = c("BA.2", "BA.2.12.1"), location = "United States", ndays = 90)

# Plot the results
plotPrevalenceDotPlot(prev_by_state, "Prevalence over the last 90 days in the United States", subtitle = paste0("As of ", format(Sys.Date(), '%d %B %Y')))

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