Hi All,
I'm currently co-developing an R
package on github which can be installed using devtools::install_github('repo/pkgname)
, as usual.
We have diligently used roxygen2
to document the individual functions.
We have split the functions into "internal" (@keywords internal
) vs. "external" (@export
)
so that the user gets to use the external functions i.e.pkgname::external_<fn_name>
and access documentation. They can also use :::
to access the internal
functions if they wish.
For some meta analysis of our package it would be nice to have a functionality
that produced a tidy tibble with the following columns:
- function name,
- function type i.e. internal/external (accessible by
::
or:::
to the user) - More metadata e.g. another column containing parameter names for each function i.e.
@param
values - documentation strings for each parameter
As a crude version (non-tibble format) for say dplyr. One can do something like:
library(dplyr) # Assume installed already
ls('package:dplyr')
This produces a character vector of function names, but not a tidy tibble with more
useful metadata.
Ideally we would be able to produce this tibble after doing devtools::load_all(".")
in
our package development, to track changes in real-time.
Are there any existing R
packages that can help with such a query? Or can such a function be
developed for this using existing R
packages?
Please note: This is now cross-posted here since it hasn't received a response here for a few days.