-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathANOSIM.R
More file actions
45 lines (27 loc) · 693 Bytes
/
ANOSIM.R
File metadata and controls
45 lines (27 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#' @title: ANOSIM for SEER
#' @author: Dean A. Erasmus
#' @description
#' Analysis of Similarity for Soil Ecology and Entomology Research lab.
#'
# Setup ----
rm(list = ls())
getwd()
# packages
library(tidyverse)
library(vegan)
### ## # ## ### ## # ## ### ## # ## ###
# Data ----
data(dune) # species abundance data
data(dune.env) # environmental data
head(dune)
head(dune.env)
### ## # ## ### ## # ## ### ## # ## ###
# Distance ----
dune.dist <- vegdist(dune, method = 'bray')
dune.dist
### ## # ## ### ## # ## ### ## # ## ###
# ANOSIM ----
dune.anosim <- anosim(dune.dist, dune.env$Management)
summary(dune.anosim)
plot(dune.anosim)
### ## # ## ### ## # ## ### ## # ## ###