View source: R/import_maxent.R
import_maxent | R Documentation |
Create a MaxEnt object from a previously-fitted Maxent model
import_maxent(dir, lambdas, html)
dir |
The file path to the directory containing Maxent output. |
lambdas |
The name of the .lambdas file representing the fitted model
(e.g. |
html |
The name of the .html file containing reported Maxent results
(e.g. |
A MaxEnt
object (see dismo::MaxEnt).
# Below we use the dismo::maxent example to fit a Maxent model:
library(dismo)
if (require(dismo) && require(rJava) &&
file.exists(system.file('java/maxent.jar', package='dismo'))) {
predictors <- stack(list.files(
file.path(system.file(package='dismo'), 'ex'), '\\.grd$', full=TRUE))
occ <- read.csv(file.path(system.file(package="dismo"), 'ex/bradypus.csv'))[, -1]
d <- file.path(tempdir(), 'demo')
dir.create(d)
m1 <- maxent(predictors, occ, factors='biome', path=d)
m2 <- import_maxent(d)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.