[Rd] CRAN policies

Matthew Dowle mdowle at mdowle.plus.com
Thu Mar 29 19:40:34 CEST 2012

William Dunlap <wdunlap <at> tibco.com> writes:

> > -----Original Message-----
> > The survival package has a similar special case: the routines for
> > expected population survival are set up to accept multiple types of date
> > format so have lines like
> >      if (class(x) == 'chron') { y <- as.numeric(x - chron("01/01/1960")}
> > This leaves me with two extraneous "no visible binding" messages.
> Suppose we defined a function like
>   NO_VISIBLE_BINDING(expr) expr
> and added an entry to the stuff in codetools so that it
> would not check for misspelled object names in call to
> NO_VISIBLE_BINDING.  Then Terry could write that line as
>      if (class(x) == "chron") { y <- as.numeric(x - NO_VISIBLE_BINDING(chron)
> and the Notes would disappear.

That's ok for package code, but what about test suites?  Say there was a test 
on the result of "with(DF,a+b)", you wouldn't want to change the test to "with
(DF,NO_VISIBLE_BINDING(a)+NO_VISIBLE_BINDING(b))" not just because that's long 
and onerous, but because that's *changing* the test i.e. introducing a 
difference between what's tested and what user code will do.

As others suggested, how about a new category: MEMO. The "no visible binding" 
NOTE would be downgraded to MEMO. CRAN maintainers could then ignore MEMOs more 

What I really like about NOTES is that when new checks are added to R then as a 
package maintainer you know you don't have to fix them straight away. If a new 
WARNING shows up on r-devel daily checks, however, then you've got some warning 
about the WARNING that you need to fix more urgently and may even accelerate a 
release. So it's not just about checks when submitting a package, but what 
happens afterwards as R itself (and packages in Depends) move on. In other 
words, you know you need to fix new NOTES but not as urgently as new WARNINGS.


More information about the R-devel mailing list