[Roxygen-devel] Missing quotes in default arguments

Charlotte Wickham cwickham at gmail.com
Wed Jun 17 02:48:58 CEST 2009


If my function has an argument with a default value that is quoted the
quotes don't appear under usage in the .Rd file.

An example building on the minimal example in the vignette: hello-roxygen.R
---------------------
#' A package to check Roxygen's sanity
#' @name helloRoxygen-package
#' @docType package
NA

#' a function with a quoted default argument
print_word <- function(word = "hello"){
  print(word)
}
---------------------
So, I'd expect in print_word.Rd:
\usage{print_word(word="hello")}

But, after:
library(roxygen)
package.skeleton('helloRoxygen', code_files = 'hello-roxygen.R', force = TRUE)
roxygenize('helloRoxygen', roxygen.dir= 'helloRoxygen',
    copy.package=FALSE, unlink.target=FALSE)

the print_word.Rd file has:
\usage{print_word(word=hello)}

no quotes.  Am I missing something?  I guess I can always use @usage.

Charlotte


More information about the Roxygen-devel mailing list