plot_transmissions: Plot Transmission Events

View source: R/plot_transmissions.R

plot_transmissionsR Documentation

Plot Transmission Events

Description

'plot_transmissions' takes a data.frame created with graph_crossing, converts it to an igraph graph object, and plots transmission events.

Usage

plot_transmissions(
  gc_out,
  vertex.size = 40,
  vertex.label = NA,
  edge.arrow.size = 0.5,
  vertex.label.cex = 1,
  title = ""
)

Arguments

gc_out

an edgelist data.frame created with graph_crossing()

vertex.size

node size in plot

vertex.label

label for graph vertices

edge.arrow.size

size of the directed arrows, default 0.5

vertex.label.cex

size for vertex labels

title

plot title

Value

a plot of the igraph object

Examples


obj <- simulate_schedule(n_animals = 10, n_groups = 2, time_to_leave = 5,
                         time_to_return = 2, travel_time = c(0.001, 0.2), sampling_duration = 30,
                         simulator = "independent")

out <- graph_crossing(obj, 2, 5, names(obj)[[1]])
plot_transmissions(out)


gavincotterill/modulr documentation built on Nov. 30, 2022, 11:15 p.m.