You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to write my own simulate function for a package I am implementing that will rely on dharma. I am trying to use dharma's getRandomState function at the beginning of my simulate function, similarly to dharma's simulateResiduals function. However, when I use seed=NULL, I get an error due to a logical problem in getRandomState, I think.
Reprex:
y = rnorm(100)
x = rnorm(100)
mod = lm(y~x)
simulateResiduals(mod, seed=NULL)
> Error in if (is.logical(seed) & seed == F) { : argument is of length zero
Because seed=NULL, NULL==F returns a zero-length vector.
The text was updated successfully, but these errors were encountered:
This was indeed a bug, thanks for reporting this. I am just running the tests and will push this to master in a second (for how to install, see start page).
About your simulate function - is this a regression package, or a package that requires simulations? If the former, note https://github.com/florianhartig/DHARMa/wiki/Adding-new-R-packages-to-DHARMA, if the latter, note that DHARMa as internal S3 wrappers for the supported package in file compatibility.R, see ?DHARMa::getSimulations
Hello,
I am attempting to write my own
simulate
function for a package I am implementing that will rely on dharma. I am trying to use dharma'sgetRandomState
function at the beginning of mysimulate
function, similarly to dharma'ssimulateResiduals
function. However, when I useseed=NULL
, I get an error due to a logical problem ingetRandomState
, I think.Reprex:
Because
seed=NULL
,NULL==F
returns a zero-length vector.The text was updated successfully, but these errors were encountered: