[R-pkg-devel] [R] Submit your own R package - @examples

Duncan Murdoch murdoch@dunc@n @ending from gm@il@com
Wed Aug 8 11:26:34 CEST 2018


On 08/08/2018 3:08 AM, Johanna Schwarz wrote:
> Dear community,
> 
> I am trying to submit my first R package to CRAN and stumbled upon the
> following problem:
> 
> Most of my methods, are not exported to the namespace using the @examples
> options.
> 
> Will I have to provide @examples for these methods in the documentation? If
> yes, I have the problem that when I run the @examples for the method that is
> not exported, I receive the error
> 
> Error in foo() : could not find function "foo"
> 
> Execution halted
> 
>   
> 
> What am I missing? Will I even have to provide examples to pass the CRAN
> tests?
> 
>   

Questions about package submission should generally go to the 
r-package-devel list.

But before someone could answer this one, I think they'd need more 
detail, e.g. a full example they could run.  From your error message, 
"foo" is not a method, it is a generic, and R can't find it.  It matters 
whether it is a generic defined in your package, or in some other package.

It also matters whether you want users of your package to be able to use 
the methods you are defining.  If you don't (they are purely for 
internal use), you don't need user-level documentation for them.

Please follow up in the r-package-devel list.

Duncan Murdoch



More information about the R-package-devel mailing list