[R-pkg-devel] is this expected behavior

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Thu Sep 14 03:24:54 CEST 2023


Yes.

Demo/test files need to use the library function to attach the package like any other user.

On September 13, 2023 5:24:52 PM PDT, "Richard M. Heiberger" <rmh using temple.edu> wrote:
>I have a demo file that uses a function defined in the package.
>when I force the demo to be run with
>R CMD check --test-dir=demo findme_1.0.tar.gz
>then the function defined in the package is not recognized.
>
>Here is the demo/findme.r file:
>
>findme::findme()
>findme()
>
>
>Here is the result of:
>
>R CMD check --test-dir=demo findme_1.0.tar.gz
>
>* checking tests in ‘demo’ ...
>  Running ‘findme.r’
> ERROR
>Running the tests in ‘demo/findme.r’ failed.
>Complete output:
>  > findme::findme()
>  [1] "You found me"
>  > findme()
>  Error in findme() : could not find function "findme"
>  Execution halted
>
>
>The first line with the "::" executed.
>The second line, which assumed the function in the current package
>would be exported, was not found.
>
>Is this the expected behavior?
>
>Thanks
>Rich
>______________________________________________
>R-package-devel using r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-package-devel mailing list