Description Usage Arguments Details Value Author(s) References Examples

This function compares the distance among sites as displayed in an ordination diagram (generated by `ordiplot`

) with the actual distances among sites as available from a distance matrix (as generated by `vegdist`

).

1 2 | ```
distdisplayed(x, ordiplot, distx = "bray", plotit = T, addit = F,
method = "spearman", permutations = 100, abline = F, gam = T, ...)
``` |

`x` |
Community data frame (with sites as rows, species as columns and species abundance as cell values) or distance matrix. |

`ordiplot` |
Ordination diagram generated by |

`distx` |
Ecological distance used to calculated the distance matrix (theoretically the same distance as displayed in the ordination diagram); passed to |

`plotit` |
Should a plot comparing the distance in ordination diagram (or the distance matrix) with the distance from the distance matrix be generated (or not). |

`addit` |
Should the GAM regression result be added to an existing plot (or not). |

`method` |
Method for calculating the correlation between the ordination distance and the complete distance; from function |

`permutations` |
Number of permutations to assess the significance of the Mantel test; passed to |

`abline` |
Should a reference line (y=x) be added to the graph (or not). |

`gam` |
Evaluate the correspondence between the original distance and the distance from the ordination diagram with GAMas estimated by |

`...` |
Other arguments passed to |

This function compares the Euclidean distances (between sites) displayed in an ordination diagram with the distances of a distance matrix. Alternatively, the distances of one distance matrix are compared against the distances of another distance matrix.

These distances are compared by a Mantel test (`mantel`

) and (optionally) a GAM regression (`gam`

). Optionally, a graph is provided compairing the distances and adding GAM results.
.

The function returns the results of a Mantel test and (optionally) the results of a GAM analysis.

Roeland Kindt (World Agroforestry Centre)

Kindt, R. & Coe, R. (2005) Tree diversity analysis: A manual and software for common statistical methods for ecological and biodiversity studies.

https://www.worldagroforestry.org/output/tree-diversity-analysis

1 2 3 4 5 6 7 8 |

```
Loading required package: tcltk
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
BiodiversityR 2.11-1: Use command BiodiversityRGUI() to launch the Graphical User Interface;
to see changes use BiodiversityRGUI(changeLog=TRUE, backward.compatibility.messages=TRUE)
Warning message:
no DISPLAY variable so Tk is not available
Loading required package: nlme
This is mgcv 1.8-28. For overview type 'help("mgcv-package")'.
species scores not available
$gamanalysis
Family: gaussian
Link function: identity
Formula:
dist2 ~ s(dist1)
Parametric coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.487297 0.006694 72.8 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Approximate significance of smooth terms:
edf Ref.df F p-value
s(dist1) 1.732 2.176 482.3 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
R-sq.(adj) = 0.847 Deviance explained = 84.9%
GCV = 0.0086368 Scale est. = 0.0085126 n = 190
$mantelanalysis
Mantel statistic based on Spearman's rank correlation rho
Call:
mantel(xdis = dist1, ydis = dist2, method = method, permutations = permutations)
Mantel statistic r: 0.9232
Significance: 0.009901
Upper quantiles of permutations (null model):
90% 95% 97.5% 99%
0.113 0.165 0.193 0.203
Permutation: free
Number of permutations: 100
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.