ropensci / NLMR

📦 R package to simulate neutral landscape models 🏔
https://ropensci.github.io/NLMR/
65 stars 17 forks source link

nlm_fbm #18

Closed marcosci closed 6 years ago

marcosci commented 6 years ago

https://github.com/ropensci/onboarding/issues/188#issuecomment-368042693:

nlm_fbm:

Add in checkmate::assert_true(fract_dim > 0).

The code checks that fract_dim is < 2, but the help file states that this parameter is including 2 - fract_dim = numeric in (0, 2]

Values of fract_dim between ~1.56 and ~1.99 generate an error. This is caused by the RandomFields::RFsimulate function.

If this function is run with a random seed, it holds onto it until a new seed is set. This can be fixed by removing the if (!is.null(user_seed)) statement. The default user_seed = NULL will set the seed back to NA.

mattfrit commented 6 years ago

opened fix/18 branch. added check and seed reset.

the error with the alpha values is somewhere in rfInit. it is possible to produce output by switching modus_operandi to "sloppy"...