[R-pkg-devel] Issue with closures & devtools::document/check

James Toll james at jtoll.com
Sun Jun 28 22:35:10 CEST 2015


> On Jun 28, 2015, at 2:58 PM, Winston Chang <winstonchang1 at gmail.com> wrote:
> 
> If you want to change that, you can add this to the top of square.R:
> 
> #' @include testClosure.R


Yes, I believe that mostly fixed my issue.  Thank you. 

I also needed to include NULL after that line, so that documentation would build.

#' @include testClosure.R
NULL
…


I guess this was actually more of an roxygen2 issue rather than devtools, but it turns out Hadley has a bit of info on this issue in his “R Packages” book.

http://r-pkgs.had.co.nz/man.html#man-classes

"By default, R code is loaded in alphabetical order, but that won’t always work for your situation. Rather than relying on alphabetic ordering, roxygen2 provides an explicit way of saying that one file must be loaded before another: @include. The @include tag gives a space separated list of file names that should be loaded before the current file:"

Thanks again for your help.


James



More information about the R-package-devel mailing list