[Roxygen-devel] @export tag doesn't work with S4 methods for use.Rd2=TRUE

Vinh Nguyen vqnguyen at uci.edu
Thu Oct 14 02:20:35 CEST 2010


Dear list,

Reporting yet another issue with S4 in roxygen.  It appears that the
@export tag does not work when use.Rd2=TRUE:
##' Inference for fitted model objects.
##'
##' Extract point estimates, standard errors, confidence intervals,
##' p-values, and sample size.
##' @rdname infer,-methods
##' @aliases infer infer,-method infer,lm-method infer,glm-method
##' @docType methods
##' @usage infer(fitobj, vars=NULL, robust.se=TRUE, two.sided=TRUE
##' , ci.level=0.95)
##' @param fitobj Fitted model object, such as those of class \code{lm}.
##' @param vars Vector of variable names to obtain inference information
##' for.  Defaults to \code{NULL} which corresponds to all variables
##' in the fitted model.
##' @param robust.se Boolean indicator for whether robust standard
##' errors should be use.  Defaults to \code{TRUE}.
##' @param two.sided Boolean indicator for whether p-values should
##' correspond to a two-sided test or one-sided.  Defaults to
##' \code{TRUE}.
##' @param ci.level Confidence level.  Defaults to 0.95.
##' @param ... Not used.
##' @return S4 \code{inference} object.
##' @examples
##' infer(lm(rnorm(100) ~ runif(100)))
##' @export
##' @author Vinh Nguyen
setGeneric("infer", function(fitobj, ...) standardGeneric("infer"))

export(infer) does not get placed in NAMESPACE.  It does work for the
following example:

##' hello
##'
##' hello
##' @title hello
##' @param x
##' @return what
##' @author Vinh Nguyen
##' @export
hello <- function(x){
x
}

This presents an issue in that written examples won't run and pass "R
CMD check".  We can manually place it in NAMESPACE ourselves, but the
roxygen parser removes it whenever roxygen is ran.

Vinh
--
Vinh Nguyen
Department of Statistics
Donald Bren School of ICS
2231 Bren Hall
University of California, Irvine
Irvine, CA 92607
vqnguyen at uci.edu | http://www.ics.uci.edu/~vqnguyen/
Schedule a meeting: http://tungle.me/VinhNguyen


More information about the Roxygen-devel mailing list