Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-18 Thread Jari Oksanen
I am afraid that these suggestions may not work. There are more choices than Win32 and Win64, including several flavours of BLAS/Lapack which probably are involved if you evaluate eigenvalues, and also differences in hardware, compilers and phase of the moon. If there are several equal

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-18 Thread Facundo Muñoz
In my opinion, the underlying problem is that you are checking whether the test reproduces exactly your pre-computed solution, while there actually exist other valid answers. I believe you want to check whether the sub-spaces are the same, not whether the bases are identical (which can depend on

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-18 Thread Martin Maechler
> William Dunlap > on Thu, 17 May 2018 11:28:50 -0700 writes: > Your explanation needs to be a bit more general in the > case of identical eigenvalues - each distinct eigenvalue > has an associated subspace, whose dimension is the number > repeats of that eigenvalue

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-17 Thread William Dunlap
But why would you want to tie your tests to specific platforms, if mathematically all those results are equivalent? You could compare the orthogonal complements from a full rank matrix (say the identity) to each expected eigenspace. E.g., for the example I gave above, where e2 and e1 gave

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-17 Thread Kevin Coombes
Yes; but I have been running around all day without time to sit down and try them. The suggestions make sense, and I'm looking forward to implementing them. On Thu, May 17, 2018, 3:55 PM Ben Bolker wrote: > There have been various comments in this thread (by me, and I think >

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-17 Thread Ben Bolker
There have been various comments in this thread (by me, and I think Duncan Murdoch) about how you can identify the platform you're running on (some combination of .Platform and/or R.Version()) and use it to write conditional statements so that your tests will only be compared with reference values

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-17 Thread Kevin Coombes
Yes; I'm pretty sure that it is exactly the repeated eigenvalues that are the issue. The matrices I am using are all nonsingular, and the various algorithms have no problem computing the eigenvalues correctly (up to numerical errors that I can bound and thus account for on tests by rounding

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-17 Thread Martin Maechler
> Duncan Murdoch > on Thu, 17 May 2018 12:13:01 -0400 writes: > On 17/05/2018 11:53 AM, Martin Maechler wrote: >>> Kevin Coombes ... on Thu, 17 >>> May 2018 11:21:23 -0400 writes: >>[..] >> > [3] Should the documentation (man

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-17 Thread Duncan Murdoch
On 17/05/2018 11:53 AM, Martin Maechler wrote: Kevin Coombes on Thu, 17 May 2018 11:21:23 -0400 writes: > Hi, I wrote and maintain the Thresher package. It includes > code to do simulations. In the "tests" directory of the > package, I do some

Re: [R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-17 Thread Martin Maechler
> Kevin Coombes > on Thu, 17 May 2018 11:21:23 -0400 writes: > Hi, I wrote and maintain the Thresher package. It includes > code to do simulations. In the "tests" directory of the > package, I do some simple simulations and run the main >

[R-pkg-devel] mvrnorm, eigen, tests, and R CMD check

2018-05-17 Thread Kevin Coombes
Hi, I wrote and maintain the Thresher package. It includes code to do simulations. In the "tests" directory of the package, I do some simple simulations and run the main algorithm, then write out summaries of the results The initial submission of the package to CRAN was delayed because the