Skip to content

Commit a24f100

Browse files
committed
Avoid error when maxent.jar is not present
Former-commit-id: bda139c
1 parent 7fdc78d commit a24f100

File tree

3 files changed

+43
-6
lines changed

3 files changed

+43
-6
lines changed

data/eval2.rda

292 KB
Binary file not shown.

man/eval2.Rd

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
\name{eval2}
2+
\alias{eval2}
3+
\docType{data}
4+
\title{ An object of class "ENMevaluation" }
5+
\description{ An example results file based on a call of ENMevaluate for use in the ENMeval vignette. }
6+
\usage{ data(eval2) }
7+
\format{
8+
An object of class 'ENMevaluation' with nine slots:
9+
10+
\code{@ results} : data.frame of evaluation metrics
11+
12+
\code{@ predictions} : RasterStack of model predictions
13+
14+
\code{@ models}: list of \code{MaxEnt} model objects (see \code{MaxEnt} documentation for details)
15+
16+
\code{@ partition.method}: character giving method of data partitioning
17+
18+
\code{@ occ.pts} : data.frame of latitude and longitude of occurrence localities
19+
20+
\code{@ occ.grp} : data.frame of bins for occurrence localities
21+
22+
\code{@ bg.pts} : data.frame of latitude and longitude of background localities
23+
24+
\code{@ bg.grp} : data.frame of bins for background localities
25+
26+
\code{@ overlap} : matrix of pairwise niche overlap
27+
28+
}
29+
30+
\details{
31+
The dataset is used for the ENMeval vignette.
32+
}

vignettes/ENMeval-vignette.Rmd

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,17 @@ Unless you supply the function with background points (which is recommended in m
257257

258258
ENMevaluate builds a separate model for each unique combination of RM values and feature class combinations. For example, the following call will build and evaluate 2 models. One with RM=1 and another with RM=2, both allowing only linear features.
259259

260-
``` {r enmeval1a, results='hide', eval=FALSE}
260+
```{r load_vignette_data, echo = FALSE}
261+
data(eval2)
262+
```
263+
264+
``` {r enmeval1a, eval=FALSE}
261265
eval1 <- ENMevaluate(occs, envs, bg, method='checkerboard2', RMvalues=c(1,2), fc=c('L'))
262266
```
263267

264268
We may, however, want to compare a wider range of models that can use a wider variety of feature classes:
265269

266-
``` {r enmeval1b, results='hide'}
270+
``` {r enmeval1b, eval=FALSE}
267271
eval2 <- ENMevaluate(occ=occs, env=envs, bg.coords=bg, method='checkerboard2', RMvalues=c(1,2), fc=c('L','LQ','LQP'))
268272
```
269273

@@ -402,9 +406,10 @@ plot(eval2@predictions[['LQP_1']], ylim=c(-30,20), xlim=c(-90,-40), legend=F, ma
402406
```
403407

404408
#### Plotting response curves {#plot.resp}
405-
We can also plot the response curves of our model to see how different input variables influence our model predictions.
406-
``` {r plot.pred3, fig.width = 5, fig.height = 5}
407-
response(eval2@models[[1]])
409+
We can also plot the response curves of our model to see how different input variables influence our model predictions. (Note that, as with the `dismo::maxent` function, using this function requires that the maxent.jar file be installed in the `dismo` package java folder).
410+
411+
``` {r response_curves, eval=FALSE}
412+
response(eval2@models[[1]])
408413
```
409414

410415
## Downstream Analyses (*under construction*) {#downstream}
@@ -418,7 +423,7 @@ Below is a running list of other things we plan to add to this vignette. Feel f
418423
## Resources (*under construction*) {#resources}
419424

420425
###### Web Resources
421-
- [Hijmans, R. and Elith, J. (2016) Species distribution modeling with R. dismo vignette.](https://cran.r-project.org/web/package=dismo)
426+
- [Hijmans, R. and Elith, J. (2016) Species distribution modeling with R. dismo vignette.](https://cran.r-project.org/package=dismo)
422427

423428
- [Phillips, S. J. (2006) Phillips, S. (2006) A brief tutorial on Maxent. AT&T Research. Available at: http://www.cs.princeton.edu/~schapire/maxent/tutorial/tutorial.doc](http://www.cs.princeton.edu/~schapire/maxent/tutorial/tutorial.doc)
424429

0 commit comments

Comments
 (0)