Up to now, external functions from packages under Imports: in DESCRIPTION were almost consistently imported in the package for their use in function code, using the @importFrom Roxygen tag.
It seems desirable to make following changes:
- We should limit this approach to often-used functions (like
mutate(), select(), filter(), ...), and use <pkg>:: syntax for other functions.
- Centralize the
@importFrom tags in a single location – R/n2khab.R – in order to reduce overhead and ensure a consistent result. Adding it separately in each function documentation makes that function documentation portable, but the completeness of imports is only tested at package level, not at function level.
Background and advice on this is given in https://r-pkgs.org/dependencies-in-practice.html#sec-dependencies-in-imports-r-code.
Up to now, external functions from packages under
Imports:inDESCRIPTIONwere almost consistently imported in the package for their use in function code, using the@importFromRoxygen tag.It seems desirable to make following changes:
mutate(),select(),filter(), ...), and use<pkg>::syntax for other functions.@importFromtags in a single location –R/n2khab.R– in order to reduce overhead and ensure a consistent result. Adding it separately in each function documentation makes that function documentation portable, but the completeness of imports is only tested at package level, not at function level.Background and advice on this is given in https://r-pkgs.org/dependencies-in-practice.html#sec-dependencies-in-imports-r-code.