[R] Roxygen examples in DONTRUN mode - how?
Dear list, I have just started to use roxygen and cannot find out how to specify NOT RUN examples. I know that to include R code examples works via the @examples tag followed by the code. Without roxygen, if I want R code not to be run when processing the .Rd files I would include the \dontrun tag \examples{\dontrun{ ... some example R code} } How can I achieve this using roxygen? Thanks Mark ––– Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Celler Straße 27 28205 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Roxygen examples in DONTRUN mode - how?
I just found out myself: Just use the commands you would use in the normal .Rd files aftter the @examples tag in roxygen (i.e. @examples dontrun{ some r examples } Here comes a small roxygen docu example with an example that is NOT RUN. ## #' some function title #' #' some description #' #' @param x any R object that has a print function #' @return NULL only printing #' @examples \dontrun{ #'foo(test) #'foo(1:10) #' } foo - function(x) print(x) ––– Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.