lsp_to_dist | R Documentation |
Calculates a distance matrix based on an object of class lsp
.
lsp_to_dist(x, dist_fun, unit = "log2", p = NULL)
x |
An object of class |
dist_fun |
A distance/dissimilarity method used.
All possible values can be found using
the |
unit |
A character string specifying the logarithm unit
that should be used to compute distances that depend on log computations:
|
p |
Power of the Minkowski distance.
Used only when the |
An object of class '"dist"“
library(stars)
landcover = read_stars(system.file("raster/landcover2015s.tif", package = "motif"))
landcover_cove = lsp_signature(landcover, type = "cove", threshold = 0.9, window = 400)
landcover_cove
dist_cov = lsp_to_dist(landcover_cove, dist_fun = "jensen-shannon")
dist_cov
# larger data example
library(stars)
landcover = read_stars(system.file("raster/landcover2015.tif", package = "motif"))
landcover_cove = lsp_signature(landcover, type = "cove", threshold = 0.9, window = 2000)
landcover_cove
dist_cov = lsp_to_dist(landcover_cove, dist_fun = "jensen-shannon")
dist_cov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.