DissRef3: Similarities between references and restoration

Description Usage Arguments Value Examples

Description

Calculate similarity between plots and a group of reference plot

Usage

1
DissRef3(RELEVES, REF, METHOD = "bray", BINARY = FALSE, DUPLICATES = TRUE)

Arguments

RELEVES

Variables of the restoration sites data matrix

REF

Variables surveys of reference sites data matrix

METHOD

Dissimilarity index, partial match to "manhattan", "euclidean", "canberra", "clark", "bray", "kulczynski", "jaccard", "gower", "altGower", "morisita", "horn", "mountford", "raup", "binomial", "chao", "cao" or "mahalanobis". Cf vegan::vegdist function

BINARY

(FALSE by default) If TRUE, data is converted to binary data

DUPLICATES

(TRUE by default) Are REF plots also included in RELEVES data?

Value

Diss_Mean

average dissimilarity by RELEVES

Diss_Min

minimal dissimilarity by RELEVES

RelRef_order

list of REF names in ascending order of dissimilarity for each RELEVES

DistRef_order

list of REF distance values in ascending order of dissimilarity for each RELEVES

Examples

 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
# ------------  Creating the data needed for the example --------------------
library(vegan)
data("dune") #downloading of dune data (cf vegan)
data("dune.env") #downloading of dune.env data (cf vegan)
# keeping only the numeric variables :
dune.env <- data.frame(A1 = dune.env$A1, 
                       Moisture =  as.numeric(as.vector(dune.env$Moisture)),
                       Manure = as.numeric(as.vector(dune.env$Manure)))
                                          
# Creating a vector indicating which plots are the potential references and which ones are the restored sites
sites <- factor(c(rep("Rest",5),rep("Ref",15)))
# Creating a vector with the plot names
sites_names <- paste(sites,c(1:5,1:15))

#Poviding names to rows (useful for the outputs)
row.names(dune.env) <- sites_names
row.names(dune) <- sites_names
dune.envRest <- dune.env[sites=="Rest",]
dune.envRef <- dune.env[sites=="Ref",]

# --------------  Calculating reference dissimilarities ---------------------
Distances <- DissRef3(RELEVES = dune.envRest, REF = dune.envRef, METHOD = "euclidean", DUPLICATES = FALSE)
Distances

# ----------------  Plotting reference dissimilarities ----------------------
Diss_Ref_Plot(RELEVES = dune.envRest, REF = dune.envRef, DISTANCES = Distances, LINK_NUMBER = "N_REF", N_REF = 3)

RenaudJau/Renaudpack2 documentation built on Dec. 12, 2020, 5:14 a.m.