Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread David Hugh-Jones
On Fri, 7 Sep 2018 at 01:16, Duncan Murdoch wrote: > > > When packages delete tests just for CRAN, the quality of the repository > suffers. Users should be able to check an install by running the tests > that passed on CRAN and seeing them pass on their system as well. In my limited experience

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread Duncan Murdoch
On 06/09/2018 10:32 AM, Hadley Wickham wrote: On Wed, Sep 5, 2018 at 3:03 PM Duncan Murdoch wrote: On 05/09/2018 2:20 PM, Henrik Bengtsson wrote: I take a complementary approach; I condition on, my home-made, R_TEST_ALL variable. Effectively, I do: if (as.logical(Sys.getenv("R_TEST_ALL", "F

Re: [R-pkg-devel] [FORGED] Re: Recommendations about adding options to a package in order to change default values of some functions on-the-fly

2018-09-06 Thread Rolf Turner
On 09/07/2018 04:15 AM, Alexandre Courtiol wrote: you could: 1. directly write and then read elements in the (hidden) list .Options that is present in the global environment: Point of order Mr. Chairman (and I'm pretty sure it doesn't matter a damn) but (on my system at least) .Options i

[R-pkg-devel] questions about \dontrun{} etc.

2018-09-06 Thread Ben Bolker
{Sorry this is long, just trying to be clear and thorough.} I'm struggling a bit with some CRAN recommendations; would appreciate opinions/suggestions about how other people would handle this case. I'm working on a package (https://github.com/bbolker/broom.mixed) that processes model fits f

Re: [R-pkg-devel] Recommendations about adding options to a package in order to change default values of some functions on-the-fly

2018-09-06 Thread David Hugh-Jones
Hi all, A simple solution - if indeed you want to go down this route - is to use options() and getOption(), ensuring all options are namespaced, e.g. by prefixing them with the package name. David On Thu, 6 Sep 2018 at 17:15, Alexandre Courtiol < alexandre.court...@gmail.com> wrote: > Dear Samu

Re: [R-pkg-devel] Recommendations about adding options to a package in order to change default values of some functions on-the-fly

2018-09-06 Thread Alexandre Courtiol
Dear Samuel, Many may object (for good reasons) that adding options would clash with functional paradigm, but it is possible. I don't know about the least worse practice but as far as I would do it, you could: 1. directly write and then read elements in the (hidden) list .Options that is present

[R-pkg-devel] Recommendations about adding options to a package in order to change default values of some functions on-the-fly

2018-09-06 Thread Samuel
Hi, I would like to change the default value of some arguments of some functions in a package of mine. I don't want to change explicitly the calls in the many scripts that have been written. For example, I would to change the delimiter in all write.mytable() without changing any calls it and

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread Hadley Wickham
On Wed, Sep 5, 2018 at 3:03 PM Duncan Murdoch wrote: > > On 05/09/2018 2:20 PM, Henrik Bengtsson wrote: > > I take a complementary approach; I condition on, my home-made, > > R_TEST_ALL variable. Effectively, I do: > > > > if (as.logical(Sys.getenv("R_TEST_ALL", "FALSE"))) { > > ... > > } > >

Re: [R-pkg-devel] Vignette title problem

2018-09-06 Thread Duncan Murdoch
On 06/09/2018 6:26 AM, Christopher John wrote: Dear CRAN I have made a vignette and followed the instructions for adding a title and name at the top of the vignette, the title and name appears locally when I build it from RStudio. However, whenever it gets uploaded to CRAN, it is not there in th

[R-pkg-devel] Vignette title problem

2018-09-06 Thread Christopher John
Dear CRAN I have made a vignette and followed the instructions for adding a title and name at the top of the vignette, the title and name appears locally when I build it from RStudio. However, whenever it gets uploaded to CRAN, it is not there in the online vignette. The rest of the vignette is fi

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread Rainer M Krug
Correct - I should have thought that there is a Hadley-solution to this problem. Thanks, Rainer > On 6 Sep 2018, at 09:25, Thierry Onkelinx wrote: > > Dear Rainer, > > It looks like you are using testthat. testthat has a skip_on_cran() function. > This will always skip the subsequent tests

Re: [R-pkg-devel] Submission to CRAN when package needs personal data (API key)

2018-09-06 Thread Thierry Onkelinx
Dear Rainer, It looks like you are using testthat. testthat has a skip_on_cran() function. This will always skip the subsequent tests in the script unless the environment variable NOT_CRAN is set. Best regards, Thierry ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Governm