Learn R Programming

sarp.snowprofile.alignment (version 2.0.2)

grainSimilarity_align: Grain Type similarity matrix for DTW alignments

Description

Get the relative similarity matrix of grain types as used for snow profile alignments. This similarity matrix considers the formation and metamorphosis of grain types, as well as quirks of the SNOWPACK model.
grainSimilarity_evaluate is an analogous matrix designed for assessing the similarity between two profiles, which requires considering the resulting avalanche hazard implications of grain types.
The domain is [0, 1] --- 1 representing identical grain types. The column 'NA' can be used for unknown grain types.

Usage

grainSimilarity_align(triag = TRUE)

Value

data.frame, either triangular or symmetric

Arguments

triag

Return a triangular matrix (TRUE, default) or a symmetric matrix (FALSE)

Author

fherla

See Also

grainSimilarity_evaluate, layerWeightingMat

Examples

Run this code

## "similarity" matrix:
simMat <- grainSimilarity_align()
print(simMat)

## equivalent "distance" matrix:
distMat <- sim2dist(grainSimilarity_align())
print(distMat)

Run the code above in your browser using DataLab