Add links to a trophic table
add_link.RdAdds one or several directed links to a trophic_tbl object.
Details
The function performs several checks:
frommust be a scalar character stringtomust be a character vectorLinks must be unique
Self-loops (from == to) are forbidden
The resulting graph must remain acyclic
Examples
net <- trophic() |>
add_link("a", "b", weight = 1)