plot_import_export_local_transmission: plot_import_export_local_transmission

View source: R/Import_export_local_transmission.R

plot_import_export_local_transmissionR Documentation

plot_import_export_local_transmission

Description

This function plots the estimates of import, export and local transmission events that are obtained from running the import_export_local_transmission function. It takes the tree for which the geographical estimation has been done, the results from running import_local_transmission, the size of the time intervals used in import_local_transmission, the date of the root of the phylogeny, and the interval between dates plotted on the x-axis as input arguments.

Usage

plot_import_export_local_transmission(
  tree,
  result_import_export_local_transmission,
  time_interval_size = 1/52,
  start_time,
  date_breaks = 2,
  time_interval = c("2000-05-01", "2016-05-01"),
  main_title = "",
  text_size = 10
)

Arguments

tree

A tree object for which the geographical estimation has been done.

result_import_export_local_transmission

A list object containing the results from running the import_local_transmission function.

time_interval_size

A numeric value representing the size of the time intervals used in import_local_transmission.

start_time

A date object representing the root of the phylogeny.

date_breaks

A string representing the interval between dates plotted on the x-axis. Acceptable arguments include "1 week", "2 months","1 year" etc.

importation_or_local

A string argument that specifies whether to plot importation, local transmission or both. Acceptable arguments are: "importation","local" or "both". Note: For plotting both importation and local transmission, the grid r-package is required.

Value

This function returns a plot of importation and/or local transmission events over time.


magnusnosnes/GeoLineages documentation built on April 17, 2025, 6:29 p.m.