[Rd] CRAN policies
peter dalgaard
pdalgd at gmail.com
Thu Mar 29 15:47:14 CEST 2012
On Mar 29, 2012, at 14:58 , Brian G. Peterson wrote:
> On Thu, 2012-03-29 at 16:52 +1300, Thomas Lumley wrote:
>> The 'No visible binding for global variable" is a good example. This
>> found some bugs in my 'survey' package, which I removed. There is
>> still one note of this type, which arises when I have to handle two
>> different versions of the hexbin package with different internal
>> structures. The note is a false positive because the use is guarded
>> by an if(), but CMD check can't tell this. So, it's a good idea to
>> remove all Notes that can be removed without introducing other code
>> problems, which is nearly all of them, but occasionally there may be a
>> good reason for code that produces a Note.
>>
> 'occasionally' seems like an understatement.
>
> Here's an example:
>
> data(cars)
> lm(speed ~ dist,cars) #would produce global variables NOTE
> lm("speed ~ dist",cars) # would not produce the NOTE
Context, please. Where does this happen? (and why do you need data(cars)?)
I find it hard to believe that quoting the formula should be the solution to this issue. There must be tons of examples to the contrary.
>
> While the change required to avoid the CRAN NOTE is small, I can't think
> of a single example or text on using formulas that recommends quoting
> the formula as a best practice. I'm not sure how users or package
> authors are supposed to know that they should use a (non standard) way
> of specifying the formula to avoid wasting their time, and the CRAN
> volunteers time. I'm certain that there are many other examples, but
> this one was easy to demonstrate.
>
> Regards,
>
> - Brian
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-devel
mailing list