make.namespace.roclet {roxygen}R Documentation

Make a namespace roclet which parses the given files and writes a list of...

Description

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.

Usage

make.namespace.roclet(outfile, verbose=TRUE)

Arguments

outfile whither to send output; blank string means standard out
verbose whether to anounce what we're doing with the outfile

Details

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.

Value

Namespace roclet

Examples

#' 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')

[Package roxygen version 0.1 Index]