hydOrder: Hydrologic Ordering of a Geomorphic Proportion Matrix

View source: R/hydOrder.R

hydOrderR Documentation

Hydrologic Ordering of a Geomorphic Proportion Matrix

Description

Hydrologic Ordering of a Geomorphic Proportion Matrix

Usage

hydOrder(x, g, clust = TRUE, j.amount = 0)

Arguments

x

x data.frame, geomorphic proportion matrix, as created by soilDB::fetchOSD(..., extended=TRUE)

g

character, name of geomorphic summary table, one of: c('geomcomp', 'hillpos', 'flats', 'terrace', 'mtnpos', 'shape')

clust

logical, perform clustering of geomorphic proportion matrix

j.amount

amount of noise applied to rows having a duplicate proportion vector, passed to jitter()

Value

when clust = FALSE a vector of series names, in hydrologic ordering, otherwise a list with the following elements:

  • clust: rotated hclust object

  • hyd.order: vector of series names, in hydrologic ordering

  • clust.hyd.order: vector of series names, after clustering + rotation, approximate hydrologic ordering

  • match.rate: fraction of series matching target hydrologic ordering, after clustering + rotation

  • obj: objective function value (sum of squared rank differences), used by iterateHydOrder()

Author(s)

D.E. Beaudette

Examples


# example data, similar to results from soilDB::fetchOSD(..., extended = TRUE)
data("OSDexamples")

# no clustering of the geomorphic proportion matrix
h <- hydOrder(OSDexamples$hillpos, g = 'hillpos', clust = FALSE)

# compare with original order

data.frame(
original = OSDexamples$hillpos$series,
ordered = h
)

# cluster results
h <- hydOrder(OSDexamples$hillpos, g = 'hillpos', clust = TRUE)
str(h)

sharpshootR documentation built on Oct. 23, 2024, 1:06 a.m.