make.namespace.roclet {roxygen} | R Documentation |
Make a namespace roclet which parses the given files and writes a list of namespace directives to a given file or standard out; see Writing R Extensions (http://cran.r-project.org/doc/manuals/R-exts.pdf) for details.
make.namespace.roclet(outfile, verbose=TRUE)
outfile |
whither to send output; blank string means standard out |
verbose |
whether to anounce what we're doing with the outfile |
The namespace roclet supports the following tags:
Roxygen tag | ‘NAMESPACE’ equivalent |
@export | export |
@exportClass | exportClasses |
@exportMethod | exportMethod |
@exportPattern | exportPattern |
@S3method | S3method |
@import | import |
@importFrom | importFrom |
@importClassesFrom | importClassesFrom |
@importMethodsFrom | importMethodsFrom |
@export
setMethod
,
setClass
, etc. Otherwise,
@export f g ...
translates to
export(f, g, ...)
.@exportClass
setClass
.@exportMethod
setMethod
or setGeneric
.@exportPattern
@S3method
@import
@importFrom
@importClassesFrom
@importMethodsFrom
Namespace roclet
#' An example file, example.R, which imports #' packages foo and bar #' @import foo bar roxygen() #' An exportable function #' @export fun <- function() {} roclet <- make.namespace.roclet() ## Not run: roclet$parse('example.R')