Learn R Programming

foodwebr (version 1.0.0)

graphviz_spec_from_matrix: Create a graphviz specification from a function matrix

Description

Given a function matrix created by foodweb_matrix(), convert it into a text specification that can be passed to DiagrammeR::grViz().

Usage

graphviz_spec_from_matrix(funmat)

Value

A text string.

Arguments

funmat

A function matrix generated by foodweb_matrix().

See Also

Examples

Run this code

fm <- matrix(c(0, 1, 1, 1, 0, 1, 0, 1, 0), nrow = 3)
colnames(fm) <- rownames(fm) <- c("foo", "bar", "baz")
graphviz_spec_from_matrix(fm)

Run the code above in your browser using DataLab