Problem with dismo::mess in session code

70 views
Skip to first unread message

qaccb...@gmail.com

unread,
Jul 4, 2020, 10:32:56 AM7/4/20
to Wallace Ecological Modeling App

Dear Wallace community,

I am currently working on a project involving environmental niche modeling and I have been using the brilliant Wallace GUI app.

I want to project models generated on present day environmental layers from bioclim onto environmental layers representing the past. For this, I extracted the session code after using the GUI and changed it to project the model on my environmental layers of the past which worked like a charm. However, I am having troubles with the step "Calculate Environmental Similarity". The problem occurs specifically at line:

 proj.mess <- dismo::mess(predsProj, occEnvVals)

 which returns the following error message over and over again:

no non-missing arguments to min; returning Info non-missing arguments to min; returning Infno non-missing arguments to min;

This problem is not specific to my modified session code. I generate a session code by using "3 Env Data: Module WorldClim Bioclims" and use the maxnet algorithm to build the model. Later in "8 Project" I choose “Project to New Time” and pick some layers. I make a polygon to which's extend the model is projected. I’m using Windows.

In the GUI everything works fine including the "Calculate Environmental Similarity" step. After running the unmodified resulting session code I get the same error message at step "proj.mess <- dismo::mess(predsProj, occEnvVals)" again.

I could not find a solution to this until now and would be very happy about some ideas how to solve this problem.

 All the best

qaccb...@gmail.com

unread,
Jul 4, 2020, 10:33:00 AM7/4/20
to Wallace Ecological Modeling App

Gonzalo Pinilla-Buitrago

unread,
Jul 14, 2020, 1:12:42 AM7/14/20
to Wallace Ecological Modeling App
Hello,

Sorry for the late reply, and thanks for reporting this bug. You are right; I was able to reproduce the error. Fortunately, it is something easy to fix. Please add the function suppressWanings() in the proj.mess line:

proj.mess <- suppressWarnings(dismo::mess(predsProj, occEnvVals))

I'm not sure why the warning is printed several times in the console, but this suggestion is the workaround that we are using internally on Wallace GUI.

Let me know if this works for you.

Best,
Gonzalo

qaccb...@gmail.com

unread,
Jul 16, 2020, 4:32:17 PM7/16/20
to Wallace Ecological Modeling App
Dear Gonzalo,

I have tried out your suggestion and it now works. Thank you so much for the solution to this problem!

All the best
Reply all
Reply to author
Forward
0 new messages