r - 使用 NLMR 包修复 R 中的种子
问题描述
我正在使用NLMR包
# simulate polygonal landscapes
mosaicgibbs <- NLMR::nlm_mosaicgibbs(ncol = 100,
nrow = 100,
germs = 20,
R = 2,
patch_classes = 3)
# visualize the NLM
rasterVis::levelplot(mosaicgibbs, margin = FALSE, par.settings = rasterVis::viridisTheme())
但我想修复种子数以重现空间模式。
我试过了,set.seed(123)
但它不起作用。E.
解决方案
我不确定这对你的情况是否有帮助,但我不能只发表评论。在nlm_gaussianfield()
设置种子的语法中是:
nlm_gaussianfield(nrow=10, ncol= 10, user_seed = 123)
默认值为NULL
. 也许这也适用nlm_mosaicgibbs()
。祝你好运!
推荐阅读
- selenium - 如何使用 Selenium 从父节点中提取文本,不包括子节点中的文本
- javascript - 数据保存到事件我得到 Push key 。但是 Event_key 分配 EventList { ref : Event_key } Firebase 实时数据库时出现问题
- android - android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class
- google-admin-sdk - G Suite:自动将子组织单位中的用户添加到组
- c++ - C++ 正确使用 cout wcout ifstream 读取带有重音字符的文本文件
- python - 无法导入 utils.programs 但成功导入 utils - python3 导入错误
- react-router-dom - react-router-dom 在多个 / in url 上给出 404
- c++ - Magick++/NAPI 模块内存泄漏
- html - CSS:旋转 90 度导航并坚持到左上角
- reactjs - React - 应用程序自定义路由在发布模式下不起作用