Re: [Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!

2020-01-14 Thread Ralf Stubner
On Wed, Jan 15, 2020 at 5:45 AM Abby Spurdle wrote: > ...however, there's another problem. > > From the dependencies: > R-java x86_64 3.6.2-1.fc31 updates 10 k > R-java-devel x86_64 3.6.2-1.fc31 updates 9.9 k > java-1.8.0-openjdk x86_64 1:1.

Re: [Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!

2020-01-14 Thread Abby Spurdle
> Which version of Fedora are you on? I've got Fedora 31. I just checked, and R 3.6.2 is available now. Progress... ...however, there's another problem. >From the dependencies: R-java x86_64 3.6.2-1.fc31 updates 10 k R-java-devel x86_64 3.6.2-1.fc31

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread peter dalgaard
Um, n(n-1)(n-2)...(n-k+1)/factorial(k), of course, but I think the argument still holds. Also, note that there are overflow conditions involved with computing n(n-1)(n-2)...(n-k+1)/factorial(k) as written, so it is computed in a loop with alternating multiply and divide steps. This introduc

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread peter dalgaard
That crossed my mind too, but presumably someone designed choose() to handle the near-integer cases specially. Otherwise, we already have beta() -- you just need to remember what the connection is ;-). I would expect that it has to do with the binomial and negative binomial distributions, but

Re: [Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!

2020-01-14 Thread Henrik Bengtsson
On Tue, Jan 14, 2020 at 1:32 PM Marc Schwartz via R-devel wrote: > > > On Jan 14, 2020, at 3:29 PM, Abby Spurdle wrote: > > > >> I do want to entice people to have a long look beyond closed > >> source OS into the world of Free Software where not only R is > >> FOSS (Free and Open Source Software

Re: [Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!

2020-01-14 Thread Marc Schwartz via R-devel
> On Jan 14, 2020, at 3:29 PM, Abby Spurdle wrote: > >> I do want to entice people to have a long look beyond closed >> source OS into the world of Free Software where not only R is >> FOSS (Free and Open Source Software) but (all / almost) all the >> tools you use are of that same spirit. > > A

Re: [Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!

2020-01-14 Thread Dirk Eddelbuettel
On 15 January 2020 at 09:29, Abby Spurdle wrote: | Recently, I tried to install R on Fedora. | However, it only gave me the option of downloading and installing R | 3.6.1, when the current release is/was R 3.6.2. | I decided to wait, and may try again later, over the next week. | | Is it possibl

Re: [Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!

2020-01-14 Thread Abby Spurdle
> I do want to entice people to have a long look beyond closed > source OS into the world of Free Software where not only R is > FOSS (Free and Open Source Software) but (all / almost) all the > tools you use are of that same spirit. And while everyone is talking about operating systems... Recent

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread John Mount
At the risk of throwing oil on a fire. If we are talking about fractional values of choose() doesn't it make sense to look to the gamma function for the correct analytic continuation? In particular k<0 may not imply the function should evaluate to zero until we get k<=-1. Example: ``` r ch

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread peter dalgaard
OK, I see what you mean. But in those cases, we don't get the catastrophic failures from the if (k < 0) return 0.; if (k == 0) return 1.; /* else: k >= 1 */ part, because at that point k is sure to be integer, possibly after rounding. It is when n-k is approximately b

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread Duncan Murdoch
On 14/01/2020 10:50 a.m., peter dalgaard wrote: On 14 Jan 2020, at 16:21 , Duncan Murdoch wrote: On 14/01/2020 10:07 a.m., peter dalgaard wrote: Yep, that looks wrong (probably want to continue discussion over on R-devel) I think the culprit is here (in src/nmath/choose.c) if (k < k_s

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread peter dalgaard
> On 14 Jan 2020, at 16:21 , Duncan Murdoch wrote: > > On 14/01/2020 10:07 a.m., peter dalgaard wrote: >> Yep, that looks wrong (probably want to continue discussion over on R-devel) >> I think the culprit is here (in src/nmath/choose.c) >> if (k < k_small_max) { >> int j; >>

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread Duncan Murdoch
On 14/01/2020 10:07 a.m., peter dalgaard wrote: Yep, that looks wrong (probably want to continue discussion over on R-devel) I think the culprit is here (in src/nmath/choose.c) if (k < k_small_max) { int j; if(n-k < k && n >= 0 && R_IS_INT(n)) k = n-k; /* <- Symmetry */

Re: [Rd] [R] choose(n, k) as n approaches k

2020-01-14 Thread peter dalgaard
Yep, that looks wrong (probably want to continue discussion over on R-devel) I think the culprit is here (in src/nmath/choose.c) if (k < k_small_max) { int j; if(n-k < k && n >= 0 && R_IS_INT(n)) k = n-k; /* <- Symmetry */ if (k < 0) return 0.; if (k == 0) ret

Re: [Rd] possible bug in win R-devel in check/test environment

2020-01-14 Thread Dirk Eddelbuettel
Hi Serguei, Nice analysis! On 14 January 2020 at 11:00, Serguei Sokol wrote: | During my recent r2sundials development, I've came across a strange test | failing during 'R CMD check' exclusively on win R-devel which I could | reproduce with a minimal example that I present here. | The toy pac

Re: [Rd] CRAN check fails if website is unavailable on Fedora platforms

2020-01-14 Thread Iñaki Ucar
On Tue, 14 Jan 2020 at 15:06, Siegfried Köstlmeier wrote: > > Hi all, > > I maintain the package „qrandom“ which is based on a web API. In last time > the testthat tests failed because the website was down. > I implemented the following code in v1.2.2 to ensure that tests are only run > if the web

[Rd] CRAN check fails if website is unavailable on Fedora platforms

2020-01-14 Thread Siegfried Köstlmeier
Hi all, I maintain the package �qrandom� which is based on a web API. In last time the testthat tests failed because the website was down. I implemented the following code in v1.2.2 to ensure that tests are only run if the website is accessible and to avoid the CRAN checks to fail: > librar

[Rd] possible bug in win R-devel in check/test environment

2020-01-14 Thread Serguei Sokol
Hi, During my recent r2sundials development, I've came across a strange test failing during 'R CMD check' exclusively on win R-devel which I could reproduce with a minimal example that I present here. The toy packages testarma1 [1] and testarma2 [2] are minimal modifications of a skeleton pack

Re: [Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!

2020-01-14 Thread Martin Maechler
> Avraham Adler > on Mon, 13 Jan 2020 14:38:12 -0500 writes: > Those of us stuck on Windows but who attempt to develop properly are > wounded to the quick, sir! > :) > Avi Indeed, you had a ' :) ' , but others have perceived this as an insult. I'm really really sorr