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
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
Reasonably Related Threads
- how to store package options over sessions?
- Reordering the results from table(cut()) by break argument
- changing a list element's name during execution in lapply - possible?
- RGtk2 / gWidgets - addHandlerClicked Problem
- gWidgets / RGtk2 - how to change a handler from a toolbar?