MixSIAR
MixSIAR copied to clipboard
Output issues: dplyr update, using 2 factors and weird plots
Hi Brian, I’m having different issues with MixSIAR. First, I am getting the error message below (right after "Plotting Geweke diagnostic" comes up in output_JAGS), that I think may be related to the latest dplyr update (1.0.0):
Error: Problem with summarise()
input n
.
x could not find function "n"
i Input n
is n()
.
i The error occured in group 1: Parameter = "deviance", Chain = 1, part = "first".
Run rlang::last_error()
to see where the error occurred.
In addition: Warning message:
tbl_df()
is deprecated as of dplyr 1.0.0.
Please use tibble::as_tibble()
instead.
rlang::last_error()
<error/dplyr_error>
Problem with summarise()
input n
.
x could not find function "n"
i Input n
is n()
.
i The error occured in group 1: Parameter = "deviance", Chain = 1, part = "first".
Backtrace:
- MixSIAR::output_JAGS(jags.uninf, mix, source)
- ggmcmc::ggmcmc(...)
- ggmcmc::ggs_geweke(D)
- dplyr::group_by(., Parameter, Chain, part)
- dplyr::summarize(., m = mean(value), sde0f = sde0f(value), n = n())
- dplyr:::summarise_cols(.data, ...)
I have been running the same model with different data sets for a while and they suddenly started giving me these errors after I changed the fixed/random factor and error structure specifications. However, when I changed the model specifications back to my original ones, I kept getting the error. Only after re-installing a previous dplyr version was I able to get rid of that error message.
However, now I am getting NAs in my [,] column after the "Plotting Geweke diagnostic" (see below)… which I wasn’t getting before (using the same data and model specifications). It only seems to happen when using two factors (runs perfectly with only one factor). I wouldn't think it has to do with my data as I have been using the same data for a while and I just started getting that now.
Plotting Geweke Diagnostic Time taken to generate the report: 99 seconds. , , 1, 1
[,1] [,2]
[1,] 0.090742076 NA [2,] 0.069428303 NA [3,] 0.044360332 NA [4,] 0.044162688 NA [5,] 0.117445203 NA [6,] 0.124717812 NA [7,] 0.131961553 NA [8,] 0.148752639 NA
I also get error messages like:
To compare, I tried running the MixSIAR example scripts and while I don't get those issues, I get other error messages (see below) and some plots are weird (see image below of the isoplot for the alligator_length script and for diet proportions for the lake example script).
I don't know if it's a general problem with my whole R and R Studio? If anyone knows what might be happening, it will be greatly appreciated.
Thank you, Adriana