Tuesday, August 16, 2016

Passing args to enmtools.maxent()

Thanks to comments from Matthew King and Nicholas Huron, I've been chasing down some bugs in how enmtools.maxent passes arguments to the "args" parameter of dismo's maxent function.  There were a couple of issues here: first, I'd just flat-out screwed something up.  That's fixed now, so go get the newest version before you do any maxenting.  Second, it just doesn't recognize "args" automatically, so you need to explicitly assign it when you call the function.  For instance, this doesn't work:

my.args =c("betamultiplier=0.5", "product=FALSE", "hinge=FALSE", "threshold=FALSE")

allogus.mx.args = enmtools.maxent(allogus, env, my.args)


But this does:

my.args =c("betamultiplier=0.5", "product=FALSE", "hinge=FALSE", "threshold=FALSE")

allogus.mx.args = enmtools.maxent(allogus, env, args = my.args)


Happy maxenting!

1 comment: