Keeping internal function examples alive

While reviewing an R package at work I realized I wasn’t totally sure what advice to give about examples for internal functions in a package. That is, there’s an R package. The package has some exported functions, and some internal functions that are not exported. Internal functions are not loaded when the package loads so the normal flow of running examples under roxygen2 tag @examples doesn’t work (assuming you don’t prevent it from running any of various ways). ...

February 4, 2025 · 3 min · Scott Chamberlai