Description Usage Arguments Value Examples
View source: R/import_maxent.R
Create a MaxEnt object from a previously-fitted Maxent model
1 | 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).
1 2 3 4 5 6 7 8 9 10 11 12 | # 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.