[R-pkg-devel] Unexpected symbol when checking package examples
murdoch@dunc@n @ending from gm@il@com
Mon Nov 12 00:53:11 CET 2018
On 11/11/2018 3:39 PM, Jared Knowles wrote:
> I have a bit of a weird issue when I'm trying to check my package merTools
> (source repo available here: https://github.com/jknowles/merTools
> On Windows and Linux builds for R-release and R-devel, when R CMD CHECK
> checks examples, it returns the following error below:
> Warning: parse error in file 'merTools-Ex.R':
> 1: unexpected symbol
> 117: cleanEx()
> 118: nameEx
I also get this error on MacOS.
> Upon inspecting the example file generated by R CMD CHECK (mertools-Ex.R) -
> it contains only valid R code. I can run it line by line or source the
> whole file in R without any errors. But, during the check process, this
> error occurs.
The problem is in the REimpact help file. It contains this:
zed3 <- REimpact(g1, newdata = InstEval[9:12, ], groupFctr = "d", breaks
and there's no closing paren.
This is in a \donttest section of the examples, so it gets deleted when
running the examples, and that's the version of merTools-Ex.R that is
left at the end. But the warning happened in a different test,
* checking for unstated dependencies in examples ... WARNING
Warning: parse error in file 'merTools-Ex.R':
1: unexpected symbol
and it is based on a different version of that file that doesn't omit
the \donttest section.
This is arguably an R bug: the line numbers are misleading, since they
refer to a version of the file that no longer exists. Perhaps when you
say \donttest, no tests should be done.
> The functions cleanEx() and nameEx() appear to be created as part of the
> checking process.
> I have not changed the examples in the code since the last time I ran R CMD
> CHECK so I am quite confident that the example code for all functions is
> valid R code.
> Any ideas on what might be the source of this problem?
> Jared Knowles
> President, Civilytics Consulting LLC
> [[alternative HTML version deleted]]
> R-package-devel using r-project.org mailing list
More information about the R-package-devel