get_graph: Turn a transmssion tree into a graph object

View source: R/viz_chains.R

get_graphR Documentation

Turn a transmssion tree into a graph object

Description

Turn a transmssion tree into a graph object

Usage

get_graph(from, to, attrs)

Arguments

from

progenitor id's

to

case id's

attrs

data.table of vertex attributes where first column is the vertex name (i.e. corresponding to unique case ids); if passing to chain stats, this data.table should atleast have one additional column named t which has the date of the case. Cannot have duplicate vertex names!

ttree

data.table with columns id_progen (id of case progenitor), id_case (id of case), t (date of case), x_coord, and y_coord

Value

a graph generated by igraph


mrajeev08/treerabid documentation built on Oct. 15, 2024, 12:14 p.m.