brianstock / MixSIAR

A framework for Bayesian mixing models in R:
http://brianstock.github.io/MixSIAR/
94 stars 75 forks source link

Runtime Error #78

Open DaveDyer opened 8 years ago

DaveDyer commented 8 years ago

Hi there,

I have been trying to work through the example scripts but keep coming across the same two error messages in both the geese and wolves scripts. I have the most up-to-date versions of RStudio, R and MixSIAR.

1. When making the isospace plot I get the following error message:

Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, : Metric information not available for this family/device

2. After running the JAGS model, which seems to work, I run the "output_JAGS(jags.1,` mix, source)" code, which runs for a bit and then stops abruptly and gives the following error message:

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

Any ideas? I am more concerned with the second error as this forces RStudio to close and I need to start again.

Many thanks,

Dave

brianstock commented 8 years ago

Hi Dave,

  1. I've seen that error before and believe it's a problem with your machine's PDF device. Not sure what OS you're using, but saving the isospace plots as PNG instead of PDF should work:
plot_data(filename="isospace_plot", 
          plot_save_pdf=FALSE,
          plot_save_png=TRUE,
mix,source,discr)

This used to work cross-platform... In the future I hope to fix this by making the PDF call OS-specific.

  1. That's weird, haven't seen it before. Does it work in R directly (not R Studio)?
DaveDyer commented 8 years ago

Isospace plot problem solved, saving them as PNG works.

I tried running the scripts in R directly and they both worked without any sign of an error, it must be something associated to RStudio...

DaveDyer commented 8 years ago

Hi Brian

I think this must just be a problem with my machine, it is getting on a bit. I asked my supervisor to run the scripts on his Mac, in RStudio, and he says everything works fine. Seems like I will just have to run the analyses in the R console .

Many thanks,

Dave

ECUmariney commented 7 years ago

Hi all,

I'm not sure if I should be asking this question here, but hopefully you may know how to resolve my problem. I'm trying to use MixSIAR on RStudio (as I'm very new to R and MixSIAR), however when I try to load my data and run the model, a message comes up in my console stating "Error in jags.model - could not find function "jags.model"". Does anyone know how I can resolve this?

I've already checked for any updates and tried reinstalling.

Any help would be greatly appreciated!

Cheers, Caitlin

AndrewLJackson commented 7 years ago

hi caitlin

try

install.packages(“rjags”)

that function is in there, and for some reason rjags didnt install with the rest of the dependencies

hopefully that fixes it

best wishes

andrew

–––––––––––– Dr Andrew Jackson, PhD, FTCD Associate Professor School of Natural Sciences, Department of Zoology Trinity College Dublin, the University of Dublin Dublin 2, Ireland.

+353 1 896 2728 | a.jackson@tcd.iemailto:a.jackson@tcd.ie Twitter: @yodacomplexhttps://twitter.com/yodacomplex http://www.tcd.ie/Zoology/research/research/theoretical/AndrewJackson.php

Trinity College Dublin, the University of Dublin is ranked 1st in Ireland and in the top 100 world universities by the QS World University Rankings.

On 26 Jul 2017, at 04:55, ECUmariney notifications@github.com<mailto:notifications@github.com> wrote:

Hi all,

I'm not sure if I should be asking this question here, but hopefully you may know how to resolve my problem. I'm trying to use MixSIAR on RStudio (as I'm very new to R and MixSIAR), however when I try to load my data and run the model, a message comes up in my console stating "Error in jags.model - could not find function "jags.model"". Does anyone know how I can resolve this?

I've already checked for any updates and tried reinstalling.

Any help would be greatly appreciated!

Cheers, Caitlin

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/brianstock/MixSIAR/issues/78#issuecomment-317940299, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADK1sOnIXfbK2_krOOqkQcHIza1a1c5lks5sRriagaJpZM4JUOJv.

brianstock commented 7 years ago

To add to Andrew's comment: if you aren't able to load rjags or R2jags (with library(R2jags)), it means JAGS isn't properly installed. Before installing MixSIAR, you need to download and install JAGS: http://mcmc-jags.sourceforge.net/.

Jarthur-12 commented 2 months ago

Hey all, hoping someone can help me troubleshoot this error. Im sure I must have missed a step, but I can't for the life of me figure out where and Chat GPT isn't being the most helpful.

" Error in jags.model(model.file, data = data, inits = init.values, n.chains = n.chains, : RUNTIME ERROR: Unable to resolve the following parameters: MU_array[1,1,1] (line 15) MU_array[1,1,2] (line 15) MU_array[1,1,3] (line 15) MU_array[1,1,4] (line 15) MU_array[1,2,1] (line 15) MU_array[1,2,2] (line 15) MU_array[1,2,3] (line 15) MU_array[1,2,4] (line 15) MU_array[2,1,1] (line 15) MU_array[2,1,2] (line 15) MU_array[2,1,3] (line 15) MU_array[2,1,4] (line 15) MU_array[2,2,1] (line 15) MU_array[2,2,2] (line 15) MU_array[2,2,3] (line 15) MU_array[2,2,4] (line 15) SIG2_array[1,1,1] (line 15, 17) SIG2_array[1,1,2] (line 15, 17) SIG2_array[1,1,3] (line 15, 17) SIG2_array[1,1,4] (line 15, 17) SIG2_array[1,2,1] (line 15, 17) SIG2_array[1,2,2] (line 15, 17) SIG2_array[1,2,3] (line 15, 17) SIG2_array[1,2,4] (line 15, 17) SIG2_array[2,1,1] (line 15, 17) SIG2_array[2,1,2] (line 15, 17) SIG2_array[2,1,3] (line 15, 17) SIG2_array[2,1,4] (line 15, 17) SIG2_array[2,2,1] (line 15, 17) SIG2_array[2,2,2] (line 15, 17) SIG2_array[2,2,3] (line 15, 17) SIG2_array[2,2,4] (line 15, 17) Sigm"