diff --git a/README.Rmd b/README.Rmd index 4273b7f..a1d8f2d 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,6 +1,5 @@ --- output: github_document -always_allow_html: true --- @@ -18,7 +17,6 @@ knitr::opts_chunk$set( # foodwebr -[![R-CMD-check](https://github.com/lewinfox/foodwebr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/lewinfox/foodwebr/actions/workflows/R-CMD-check.yaml) `foodwebr` makes it easy to visualise the dependency graph of a set of functions (i.e. who calls @@ -42,15 +40,8 @@ library(foodwebr) f <- function() 1 g <- function() f() -h <- function() { - f() - g() -} -i <- function() { - f() - g() - h() -} +h <- function() { f(); g() } +i <- function() { f(); g(); h() } j <- function() j() ``` diff --git a/README.md b/README.md index e179385..ea92e84 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ -[![R-CMD-check](https://github.com/lewinfox/foodwebr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/lewinfox/foodwebr/actions/workflows/R-CMD-check.yaml) `foodwebr` makes it easy to visualise the dependency graph of a set of @@ -28,6 +27,8 @@ which call each other: ``` r library(foodwebr) +#> Warning: replacing previous import 'vctrs::data_frame' by 'tibble::data_frame' +#> when loading 'dplyr' f <- function() 1 g <- function() f() @@ -63,8 +64,7 @@ Plotting will draw the graph. plot(fw) ``` -
- + `foodweb()` looks at its calling environment by default. If you want to look at another environment you can either pass a function to the `FUN` @@ -116,8 +116,7 @@ if (requireNamespace("cowsay", quietly = TRUE)) { } ``` - - + If we want to include *all* functions in the package, we can pass `filter = FALSE`: @@ -128,8 +127,7 @@ if (requireNamespace("cowsay", quietly = TRUE)) { } ``` - - + ### `graphviz` as text @@ -168,7 +166,7 @@ if (requireNamespace("tidygraph", quietly = TRUE)) { #> # #> # A directed multigraph with 2 components #> # -#> # A tibble: 5 × 1 +#> # Node Data: 5 x 1 (active) #> name #>