```{asis, echo = {{espace_nicheOv_knit}}, eval = {{espace_nicheOv_knit}}, include = {{espace_nicheOv_knit}}}
### Environmental space 
Evaluating niche overlap between *`r "{{spName1}}"`* & *`r "{{spName2}}"`* for which the occurrence density grid was computed. Running equivalence test ({{equiv_rmd}}) and similarity test {{simil_rmd}}
```

```{r, echo = {{espace_nicheOv_knit}}, include = {{espace_nicheOv_knit}}}
## Run tests 
espace_nicheOv_{{multAbr}} <- espace_nicheOv(
  z1 = espace_occDens_{{multAbr}}[["{{spName1}}"]],
  z2 = espace_occDens_{{multAbr}}[["{{spName2}}"]],
  iter = 100,
  similarity = {{simil_rmd}}) 
# Plots
layout(matrix(c(1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3), 4, 3, byrow = FALSE))

ecospat::ecospat.plot.niche.dyn(
  espace_occDens_{{multAbr}}[["{{spName1}}"]],
  espace_occDens_{{multAbr}}[["{{spName2}}"]],
  0.5,
  title = "{{spName1}}_{{spName2}}",
  col.unf = "blue",
  col.exp = "red",
  col.stab = "purple",
  colZ1 = "blue",
  colZ2 = "red",
  transparency = 25
)
# Plot
ecospat::ecospat.plot.overlap.test(espace_nicheOv_{{multAbr}}$simil,
                                   "D", "Similarity test") 
```
