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
This model used to work in 1.x.x :
m2 <- try(trim(total_number ~ site + year, data=obsTidy, weight=obsTidy$freq, model=3, serialcor=TRUE,overdisp=TRUE))
I noticed that weight is now called weights and had heard that the obsTidy$freq specification was not needed anymore (hence freq should be sufficient)
When I run m2 <- try(trim(total_number ~ site + year, data=obsTidy, weights=obsTidy$freq, model=3, serialcor=TRUE,overdisp=TRUE)), I get the response
"Error in trim.formula(total_number ~ site + year, data = obsTidy, weights = obsTidy$freq, : argument 'weights' should be character"
When I then modify it to:
m2 <- try(trim(total_number ~ site + year, data=obsTidy, weights=freq, model=3, serialcor=TRUE,overdisp=TRUE)), I then get the response
"Error in trim.formula(total_number ~ site + year, data = obsTidy, weights = freq, : object 'freq' not found"
I finally get it working by the unexpected version (guided by the above error stating that 'weights' should be character) :
This model used to work in 1.x.x :
m2 <- try(trim(total_number ~ site + year, data=obsTidy, weight=obsTidy$freq, model=3, serialcor=TRUE,overdisp=TRUE))
I noticed that weight is now called weights and had heard that the obsTidy$freq specification was not needed anymore (hence freq should be sufficient)
When I run m2 <- try(trim(total_number ~ site + year, data=obsTidy, weights=obsTidy$freq, model=3, serialcor=TRUE,overdisp=TRUE)), I get the response
When I then modify it to:
m2 <- try(trim(total_number ~ site + year, data=obsTidy, weights=freq, model=3, serialcor=TRUE,overdisp=TRUE)), I then get the response
I finally get it working by the unexpected version (guided by the above error stating that 'weights' should be character) :
So it looks like the variable name freq is not recognised. BTW obsTidy is a tibble that look like this:
Best wishes, Lars
The text was updated successfully, but these errors were encountered: