courtiol / IsoriX

This is the gthub repository dedicated to the development of the R package IsoriX
12 stars 5 forks source link

Trouble plotting Isoscape #113

Closed groemer closed 4 years ago

groemer commented 5 years ago

Hello,

When I try to plot the isoscape, I get the following error message:

plot(x=NAIsoscape, sources = list(draw=FALSE), mask=list(fill="lightgrey"), palette=list(range=c(-170, 0), step=10, n_labels=18,fn=viridisLite::viridis)) [1] "extracting values from stored rasters..." Error in quantile.default(v, ...) : 'probs' outside [0,1]

courtiol commented 5 years ago

Hi @groemer,

this is because some probabilities are not between 0 or 1, so that comes from other steps.

The question is why?...

Could you save your session using save.image() and send it to me for me to explore things? Or if you know how could you produce a minimal reproducible example?

Did you do anything unusual?

Best, Alex

AJW-1 commented 4 years ago

Hi @groemer and @courtiol,

I get the exact same error message when trying to plot the isoscape I have produced, I was wondering if you managed to figure out what was causing this issue please?

Thanks, Amy

courtiol commented 4 years ago

Without an example I cannot help... Could one of you create a small example and send it to me? I promise to delete your data as soon as I have figured out the problem. @groemer did you understand what your problem is? Best, Alex

groemer commented 4 years ago

Hi Alex,

We did get our problem resolved, it had to do with a data error that we tracked down that was throwing the package for a loop - a missing negative sign on a lat/long coordinate.

I had to take a hiatus on the analysis, but will be back into it shortly.

Thank you for developing such a cool package!

Best,

Gary

Dr. Gary Roemer, Professor Dept. Fish, Wildlife & Conservation Ecology New Mexico State University Las Cruces, NM 88003 Off: 575-646-3394 groemer@nmsu.edu

On Sep 4, 2019, at 10:45 AM, Alexandre Courtiol notifications@github.com wrote:

Without an example I cannot help... Could one of you create a small example and send it to me? I promise to delete your data as soon as I have figured out the problem. @groemer did you understand what your problem is? Best, Alex

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

courtiol commented 4 years ago

OK, thanks @groemer! So perhaps @AJW-1 you have a similar problem. In any case it could be good for you to help me to replicate the issue because then I could implement a better error message!

AJW-1 commented 4 years ago

Ok thanks @groemer, I'll see if I can find a similar error that may be causing it. @courtiol happy to send over an example, could I have an email address to send it over to please?

Thank you, Amy

courtiol commented 4 years ago

@AJW-1, you will get my email by simply typing utils::packageDescription("IsoriX")$Maintainer (in R); and hopefully, not writing the email here in GitHub will save me a few spams :-)

courtiol commented 4 years ago

Congrats @AJW-1, you did find a real bug! I had not considered the case for which an isoscape would have such a high resolution that it would not be stored in RAM (although I did consider this case for assignment maps). As a consequence, the internal function IsoriX:::.summarize_values fails. It is easy to fix and I will try to do so during the week-end! I'll keep you posted. Best, Alex

courtiol commented 4 years ago

@AJW-1, I think I have solved the bug. You can try to install the development version of IsoriX which include the patch using remotes::install_github("courtiol/IsoriX/IsoriX") in a new R session. Let me know if that works for you. I will then upload the patched version to CRAN.

AJW-1 commented 4 years ago

Thank you so much for sorting it so quickly @courtiol. It has all worked now and I have the isoscape!