moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

Be able to promote functions from {base} package #86

Open moodymudskipper opened 2 years ago

moodymudskipper commented 2 years ago

I think now we can't because base functions are removed in the code. If we demote the base package, it could be shown as an external reference rather than hidden. The doc should mention that {base} is hidden by defaults and how to show it, we might give instructions on how to hide primitives, using hide = names(Filter(is.primitive, as.list(baseenv()))) on top (we might add a primitives() helper), or operators/control flow, using hide = Filter(\(x) make.names(x) != x & !grepl("<-", x), ls(baseenv())).

Maybe also one for generics (incl relevant primitives) since these might map to other potentially packaged functions.

maybe we can have a function base_funs() that gives us a selection of funs to promote, demote, hide.

Actually maybe we need a helper for this for any package filter_funs(pkg, generics, S4, min_lines, regex)etc, we would still need base_funs(primitives, control_flow, ...), dots passed to filter_duns.

where "generics", "primitives" etc can be "exclude", "include" (default), or "only" (or FALSE, NA, TRUE).

moodymudskipper commented 1 year ago

It's useful to explore base functions, not sure if we'll want to promote a base function when exploring a packaged function.

Needs more time than I'd like to spend now vs value, move to further milestone