Error: Bias grid cannot be used with SWD-format background

259 views
Skip to first unread message

Paul Brewin

unread,
Nov 24, 2018, 12:37:57 PM11/24/18
to Maxent
Hi - Any idea why I'm getting this error?  I'm using a raster stack for environmental data (pred) and csv of lat/lons for the occurrence data (occ), and biasfile is a raster.  The full line is me_1 <- maxent(pred, occ, args='biasfile=bias_file').  It works without the biasfile arg.  Have searched up and down the internet - no joy.  Any help would be amazing, thanks!

Veronica Frans

unread,
Nov 25, 2018, 1:07:26 AM11/25/18
to max...@googlegroups.com
Hi Paul,

I'm pretty sure you need to say exactly where that file is located for it to work. Try something like:

args='biasfile=D:\\paul_folder\\bias_file.csv'
 
And if you have more args, be sure to concatenate them. 

args=c()

Although you're using dismo, Maxent is still running via Java. Perhaps you can double-check the specific structure of each of the additional arguments via the help section in the Maxent GUI, as well.

Hope this helps.

Veronica Frans

On Sat, Nov 24, 2018, 09:37 Paul Brewin <pebr...@gmail.com wrote:
Hi - Any idea why I'm getting this error?  I'm using a raster stack for environmental data (pred) and csv of lat/lons for the occurrence data (occ), and biasfile is a raster.  The full line is me_1 <- maxent(pred, occ, args='biasfile=bias_file').  It works without the biasfile arg.  Have searched up and down the internet - no joy.  Any help would be amazing, thanks!

--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+un...@googlegroups.com.
To post to this group, send email to max...@googlegroups.com.
Visit this group at https://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/d/optout.

Paul Brewin

unread,
Nov 25, 2018, 8:34:12 AM11/25/18
to Maxent
Thanks Veronica.  Good suggestion, but didn't work unfortunately.  I tried a few different things around your suggestion as well like using double back slashes instead of forward slashes.  I've got other arguments coded in ok as well. 

I noted that in your example you've got the bias_file.csv and not a raster? 


where it says down the page that biasfile is not implemented in dismo -so i'm thinking maybe that's part of the problem but that's from 2015, but other's have had it working like here https://tinyurl.com/y9zfedk2  I've asked the author of this post as well.

Its seems to me that the problem is that maxent() thinks that I'm using as SWD background file?

Cheers
Paul

Paul Brewin

unread,
Nov 25, 2018, 11:15:53 AM11/25/18
to Maxent
Hi again - still no joy by a workaround can be found here

cheers
Paul

Veronica Frans

unread,
Nov 25, 2018, 9:24:21 PM11/25/18
to max...@googlegroups.com
Hi Paul,

Sorry my advice didn't work out. I forgot to mention that it was my best guess at making it work, since I'd never used a bias file myself, but had used other arguments. 

Still interesting that it didn't work... Haven't been on my laptop these days so I can't test anything at the moment... 

Nevertheless, thanks for updating the forum on a solution, even though it was a work-around. It's good for others to refer to in the future. :-)

Cheers,

Veronica

Reply all
Reply to author
Forward
0 new messages