Learn R Programming

sharpshootR (version 2.3)

hydOrder: Hydrologic Ordering of a Geomorphic Proportion Matrix

Description

Hydrologic Ordering of a Geomorphic Proportion Matrix

Usage

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

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()

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()

Author

D.E. Beaudette

Examples

Run this code

# 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)

Run the code above in your browser using DataLab