[R-pkg-devel] R CMD check works but with devtools::check() examples fail

Barbara Lerner b|erner @end|ng |rom mtho|yoke@edu
Thu May 16 22:48:09 CEST 2019


Hi Dirk,

This is very helpful, thank you!  The R Internals document gave me the 
clues that I need.

I am pretty certain that more things are being checked than before as 
problems are being reported with code that has not changed.  In 
particular, it is checking if logical expressions are returning a vector 
of length > 1.  I had is.null tests where I wanted to check if a 
variable was null.  Unfortunately, when the variable contained a vector, 
it was checking whether the members were null, which is not what I 
intended.  I understand the error reports now and can fix these.

Barbara

Dirk Eddelbuettel wrote on 5/16/19 11:36 AM:
> Hi Barbara
>
> Feel free to CC back to the list which dropped off.
>
> On 16 May 2019 at 10:56, Barbara Lerner wrote:
> | You are right --as-cran gives the same errors as devtools::check.  When
> | it comes to running the examples, what is done differently with the
> | as-cran flag?
>
> Coarse level answer: we are asked to --as-cran per CRAN Repo Policy
>
> Finer level answer: it sets a few more tests, does remote check etc pp which
> is why it is not default. The fuller details are in the R manuals 'Writing R
> Extensions' and (oddly) in Section 8 of 'R Internals' (bad title, makes it as
> if we mortals were not supposed to look there) which details _all_ of the
> _many_ environment variables that can be turned on and off.
>
>  From the top of my head, I am not sure why example would run/not run. That
> has not happened to me in 20+ years of writing / using / binary building
> packages.  But I did not have time to dig -- could use/don't use suggested
> packages, could be honor/disregards \dontrun{} or \donttest{} flags. You will
> know your package better -- with some some digging I am sure you will get to
> it.
>
> Best,  Dirk
>

-- 
<http://www.getpostbox.com>Barbara Lerner
Professor
Computer Science Department
Mount Holyoke College

<http://www.getpostbox.com>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list