Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flow view deps with global env #181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions R/09_flow_view_deps.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
#' @description
#' `r lifecycle::badge("experimental")`
#' @param fun A function, can be of the form `fun`, `pkg::fun`, `pkg:::fun`,
#' if in the form `fun`, the binding should be located in a package namespace
#' or the global environment. It can also be a named list of functions, such as
#' if in the form `fun`, the binding should be located in a package environment
#' attached on the search path or in the global environment. It can also be a
#' named list of functions, such as
#' one you'd create with `dplyr::lst()`, for instance `lst(fun1, pkg::fun2)`.
#' @param max_depth An integer, the maximum depth to display
#' @param trim A vector or list of function names where the recursion will stop
Expand Down Expand Up @@ -266,6 +267,7 @@ flow_view_deps_df <- function(target_fun_name, target_fun, trim, promote, demote
}

deps <- function(pkg) {
if (pkg == "R_GlobalEnv") return(character())
desc <- read.dcf(system.file("DESCRIPTION", package = pkg))
desc <- desc[,intersect(c("Imports", "Depends"), colnames(desc))]
setdiff(trimws(unique(unlist(
Expand Down
5 changes: 3 additions & 2 deletions man/flow_view_deps.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading