[R] Running examples failed (but there are none).

Jim Lemon jim at bitwrit.com.au
Fri Feb 13 12:21:05 CET 2009


Remko Duursma wrote:
> Dear R-helpers,
>
> making a package (windowsXP), that includes a bunch of functions, but
> none have examples (all example code is within \dontrun{} blocks).
>
> I do R CMD check Maeswrap, all bits get OK-ed, except:
>
> "Running examples in 'Maeswrap-Ex.R' failed."
>
> When I run the 'Maeswrap-Ex.R' file myself, there are no problems.
>
> Any pointers?
>   
Hi Remko,
There are a number of ways in which the example code can run in the 
current R interpreter but fail in the checking of a package. Quite often 
it is that a package has been loaded in the current R interpreter and 
that package is not explicitly loaded in the example section. Even when 
it is loaded explicitly, there can be problems making sure that the 
example won't run if the package is unavailable. I devised an example 
for the vector.field function that used the maps package and I was never 
able to work out how to get it to check properly.

Jim




More information about the R-help mailing list