# NOT RUN {
## call function with two snow profiles of unequal lengths, without using a window function:
dMat_noWindow <- distMatSP(SPpairs$A_modeled, SPpairs$A_manual, windowFunction = NA)
graphics::image(dMat_noWindow, main = "Default distance matrix without a warping window")
## compute distance based on grain type alone,
## and additionally disable preferential layer matching:
dMat <- distMatSP(SPpairs$A_modeled, SPpairs$A_manual, windowFunction = NA,
dims = "gtype", weights = 1, prefLayerWeights = NA)
graphics::image(dMat,
main = "... only based grain type, and without preferential layer matching")
## to use a warping window, the profiles need to have equal numbers of layers:
## i.e., resample them first, then compute dMat with a warping window
plist <- resampleSPpairs(SPpairs$A_modeled, SPpairs$A_manual)
dMat <- distMatSP(plist$query, plist$ref)
graphics::image(dMat, main = "Default with warping window")
# }
Run the code above in your browser using DataLab