I am developing a custom R package with RStudio, documented using roxygen2.
Please consider this feature:
getTest <- function() {
return("test")
}
If I started R CMD checkwith the function documentation written as described above, everything is in order, it checkis transmitted with success.
Now, if I remove @export(because I do not want this function to be visible from outside the package), I get the following error:
* checking examples ... ERROR
Running examples in 'MyPackageName-Ex.R' failed
The error most likely occurred in:
>
>
>
>
>
>
> getTest()
Error: could not find function "getTest"
Execution halted
It seems that checking the functions from @examplesis performed from outside the package !?
How to check examples of non-exported function?
source
share