[R-pkg-devel] Roxygen and Namespace
jenny at stat.ubc.ca
Fri Jun 10 17:51:57 CEST 2016
> exportPattern("^[[:alpha:]]+") means
It is a regular expression that basically says "export all the things", meaning the functions provided by your package. I regard it as a placeholder to make things work temporarily, while you get yourself organized for more proactive management of NAMESPACE.
I don't feel like you'll ever see that combined with import directives (as you have below), once you really begin to use roxygen?
You should put
directives in the roxygen header of every function that should be exported and they will appear in NAMESPACE individually after you roxygenize or run devtools::document().
Somewhere you will also need import directives corresponding to all those imports you want to do. They can go in any roxygen header.
> On Jun 10, 2016, at 12:04 AM, Knut Krueger <rhelp at krueger-family.de> wrote:
> how can I tell Roxygen to write the namespace like
> importFrom("grDevices", "dev.off", "heat.colors", "postscript",
> importFrom("graphics", "arrows", "lines", "par", "plot", "text",
> importFrom("stats", "na.omit")
> by the way what does exportPattern("^[[:alpha:]]+") means?
> R-package-devel at r-project.org mailing list
More information about the R-package-devel