[R-pkg-devel] Example fails in check
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Fri Jul 26 14:32:44 CEST 2019
Pipes are very functional, unlike data.table. However, their extensive use of non-standard evaluation a la `subset` or `with` does complicate the package check process.
As to the actual question, Imports announces that the magrittr package is a private dependency for your package. Users would have to load that package if they wanted to use it also. Since examples are run as if they were the user, they are subject to that same constraint. The advantage of having Imports rather than Depends is that you have more flexibility to change which dependencies you use to achieve your goals as a package without affecting the functions that the user has to be prepared to use our avoid, and the user is on their own as to which packages they use.
On July 26, 2019 12:13:17 AM PDT, Uwe Ligges <ligges using statistik.tu-dortmund.de> wrote:
>I'd suggest not to use pipes in package code, as the parser does not
>know about them and hence debugging, error messages .... are more
>Why not use he functional way of R?
>For the question: I guess you do not have a corresponding entry in the
>On 26.07.2019 08:37, Sigbert Klinke wrote:
>> im my package development I get the following error when checking an
>> > m <- findMatch('test', x[], FUN='leven(code)') %>%
>> Error in findMatch("test", x[], FUN = "leven(code)") %>%
>> addWave(x[]) :
>> could not find function "%>%"
>> Execution halted
>> In my DESCRIPTION file I wrote
>> So, I expected that magrittr is loaded when the example is executed.
>> If I add an "library(magrittr)" at the beginning of the example then
>> example is okay.
>> Any ideas what goes wrong?
>R-package-devel using r-project.org mailing list
Sent from my phone. Please excuse my brevity.
More information about the R-package-devel