# Create some functions to look at
f <- function() 1
g <- function() f()
h <- function() {
f()
g()
}
i <- function() {
f()
g()
h()
}
j <- function() j()
x <- foodweb()
x
# You can access the components directly or via getter functions
x$funmat
get_graphviz_spec(x)
# Calculate the foodweb of a function in another package
foodweb(glue::glue)
Run the code above in your browser using DataLab