sim | R Documentation |
This function is from the package simba.
One of 56 (dis)similarity measures for binary data can be set to calculate
(dis)similarities. The vegetational data can be in either database (list) or
matrix format. Same holds for the output. Simultaneous calculation of
geographical distances between plots and the virtual position of the
calculated similarity values between the parental units can be achieved if a
data.frame
with coordinates is given.
sim(
x,
coord = NULL,
method = "soer",
dn = NULL,
normalize = FALSE,
listin = FALSE,
listout = FALSE,
...
)
x |
Vegetation data, either as matrix with rows = plots and columns =
species (similarities are calculated between rows!), or as
|
coord |
A |
method |
Binary Similarity index (see |
dn |
Neighbor definition. A geographic distance represented by a numeric
or a two value vector defining a ring around each plot. Only takes effect
when |
normalize |
Logical value indicating whether the values for |
listin |
if |
listout |
If output is wanted in database format rather than as a
|
... |
given in database-format, when |
If listout = FALSE a distance matrix of class
dist
is returned. If listout = TRUE, a
data.frame
is returned with 7 columns giving the names
of the compared plots in the first two and the calculated similarity measure
in the third column. The rest of the columns give the values for a, b,
c,
and d
(in this order). Naming of the first three columns can be
changed but defaults to NBX
(one of the compared plots), NBY
(the other one), used index
(the values of the calculated index). If
coord
!= NULL, the following columns are given in addition and the
columns a:d
shift to the end of the data.frame.
require(leaflet)
tmp <- makesq(coordID = c(645260), projection = "WGS")
leaflet() %>%
addTiles() %>%
addPolygons(data = tmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.