简体   繁体   English

MuMin Dredge的进度栏

[英]Progress Bar for MuMin Dredge

I am dredging a model and some of the dredge operations take days and some take hours. 我正在疏通模型,有些疏通操作需要几天,有些需要几个小时。 I am wondering if I can tell R to give me a progress status while the dredge is running so I know how long to wait. 我想知道是否可以在挖泥机运行时告诉R给我进度状态,以便我知道要等待多长时间。

L <- lmer(Fw.FratioFall ~ scale(Average_mintemp_winter) 
          + scale(Average_mintemp_winter^2)
          + scale(percentage_woody_coverage) 
          + scale(percentage_woody_coverage^2)
          + scale(kmRoads.km2) 
          + scale(kmRoads.km2^2) 
          + scale(WELLS_ACTIVEinsideD) 
          + scale(WELLS_ACTIVEinsideD^2) 
          + scale(BadlandsCoyote.1000_mi)
          + scale(BadlandsCoyote.1000_mi^2) 
          + scale(WT_DEER_springsurveys)
          + scale(WT_DEER_springsurveys^2) 
          + scale(BadlandsCoyote.1000_mi)*scale(WELLS_ACTIVEinsideD) 
          + scale(Average_mintemp_winter)*scale(BadlandsCoyote.1000_mi)
          + scale(Average_mintemp_winter)*scale(WELLS_ACTIVEinsideD)
          + year + (year^2) + (year^3) + (1 | YEAR) + (year | StudyArea),  REML = F, data = mydata)


Model1 = dredge(L)

The problem with the dredge is that it fills the console up with `singular fit as it produces thousands of models so previous progress bars I have added get lost very quickly. 挖泥船的问题在于,由于它可以生成数千个模型,因此会以“单一拟合”的形式填充控制台,因此我添加的以前的进度条很快就会丢失。 I am wondering if I can get around this. 我想知道我是否可以解决这个问题。

Thanks ` 谢谢`

You could redirect the error stream to a file: 您可以将错误流重定向到文件:

sink(type = "message", file = "error.log")

Do not forget to close the sink afterwards, to display errors and warnings back onto the console: 不要忘记随后关闭水槽,以将错误和警告显示回控制台:

sink(type = "message")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM