tidylab/usethat

using environment for organizing functions

harell opened this issue · 0 comments

Topics

  • When to use hidden environments (start with dot) = helper functions
  • When to export environments = useful functions for the user
  • Hierarchical organization
  • Environments as a makeshift medium for functions development
  • Use non exported environment in tests filename <- usethis2:::filename

Sidenotes

  • impact of non exported environments on covr
  • documentation (roxygen2) of functions, what is possible, and how to do it

export environments

#' @keywords internal
#' @noRd
#' @export
.td <- new.env()