| lsp_to_dist {motif} | R Documentation | 
Calculate Distance Matrix
Description
Calculates a distance matrix based on an object of class lsp.
Usage
lsp_to_dist(x, dist_fun, unit = "log2", p = NULL)
Arguments
| 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  | 
Value
An object of class '"dist"“
Examples
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
[Package motif version 0.6.4 Index]