[Roxygen-devel] bug with NA argument default?

Bengoechea Bartolomé Enrique (SIES 73) enrique.bengoechea at credit-suisse.com
Thu Jan 29 12:49:49 CET 2009


Hi, I'm new to this list, so first let me say thank you for developing this tool. Being so used to maintain docs with code in other languages this should be a real time-saver.
 
I'm having a problem with roxygen. It appears both with v0.1 in CRAN for R 2.8.1, and in the latest version available on R-Forge. Session info below. 
 
An error is raised when parsing the following function definition:
 
-- FILE SNIPPET -----
lfactor <- function(x, lookup, levels=sort(unique.default(x), na.last = TRUE),
    labels=levels, exclude=NA, ordered=is.ordered(x), local.ltable) {
-----------------------------

> make.Rd.roclet()$parse('lfactor.R')
 
Error in if (is.null.string(default)) name else sprintf("%s=%s", name,  : 
  missing value where TRUE/FALSE needed
 
 
After some tests, I verified that the problem comes from the NA in "exclude=NA". If I remove this default value, the parsing is done correctly.
 
Best,
 
Enrique
 
 
> sessionInfo()
R version 2.8.1 (2008-12-22) 
i386-pc-mingw32 
 
locale:
LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252
 
attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     
 
other attached packages:
[1] roxygen_0.1     rcom_2.0-4      rscproxy_1.0-12
 
loaded via a namespace (and not attached):
[1] tools_2.8.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r-forge.r-project.org/pipermail/roxygen-devel/attachments/20090129/46b956ea/attachment.htm 


More information about the Roxygen-devel mailing list