Description Usage Arguments Details Value Examples
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.
1 | 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
May be specified with or without value;
if unadorned, roxygen will try to guess
the exported value by assignee, setMethod
,
setClass
, etc. Otherwise,
@export f g ...
translates to
export(f, g, ...)
.
@exportClass
Overrides setClass
.
@exportMethod
Overrides setMethod
or setGeneric
.
@exportPattern
See “1.6.2 Registering S3 methods” from
Writing R Extensions.
@S3method
Overrides the export of an S3 method.
@import
See “1.6.1 Specifying imports and exports”
from Writing R Extensions.
@importFrom
See “1.6.1 Specifying imports and exports”
from Writing R Extensions.
@importClassesFrom
See “1.6.6 Name spaces with formal
classes and methods” from Writing R
Extensions.
@importMethodsFrom
See “1.6.6 Name spaces with formal
classes and methods” from Writing R
Extensions.
Namespace roclet
1 2 3 4 5 6 7 8 9 10 11 | #' 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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.