0

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.

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 `

Kilian Murphy
  • 321
  • 2
  • 14

1 Answers1

1

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")
Kamil Bartoń
  • 1,482
  • 9
  • 10