Closed bertcarnell closed 5 years ago
This happens because the C code makes the implicit assumption that randomLHS
always returns values less than 1.0 (here and here, although the second one wouldn't segfault) , which is a bug.
This is coupled with a bug in the new lhs packet, which always returns a matrix of 1s if n == 1
:
> lhs::randomLHS(1, 3)
[,1] [,2] [,3]
[1,] 1 1 1
@mb706 Thanks! I don't know why I didn't see that last night. I will fix that in randomLHS and check the reverse dependencies again.
This issue is fixed in the lhs project 4cab08d80d812f7f3f74e2c7c34a1b0bf4431c09 for upcoming CRAN version 1.0
I am developing a new version of the
lhs
package athttps://github.com/bertcarnell/lhs
which I will submit to CRAN soon.ParamHelpers
importslhs
, so I was checking your package to ensure it wasn't broken. The tests inParamHelpers 1.12
fail onR CMD check
with the newlhs
package. The following comes from the output oftestthat
inR CMD check
I was able to create two reproducible examples with
lhs 1.0
. The problem appears to be in thegenerateDesign
.Call
. Something about whatrandomLHS
is returning may have changed, but I'm not sure what. The fault does not occur inrandomLHS
.