SeasonDistance: Similarity measure based on seasonality of annual maxima

Description Usage Arguments See Also Examples

View source: R/SeasonDistanceData.R

Description

Return the distance matrix between stations based on the seasonality of the annual maximum events. Optionally, a target can be passed to extract only the pooling group from a list of stations.

Usage

1
2
3
SeasonDistance(x, form = date ~ site, target = NULL, ...)

SeasonDistanceData(db, sites, ...)

Arguments

x

Hydrometric data.

form

Formula of the form date~site, that point to the columns with date and site ID.

target

Sites for which distance is returned.

...

Other parameters passed to DistSeason.

db

Path of the HYDAT database,

sites

List of sites in HYDAT.

See Also

AmaxData.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Extract similarity measure from multiple site
## with respect to target station 01AF009
h <- SeasonDistance(DemoData('region'))
print(h[1:3,1:3])
print(h[2,])

## Not run: 

## Path to HYDAT
# DB_HYDAT = ".../hydat.sqlite3"

## Compute the distance using HYDAT directly
SeasonDistanceData(DB_HYDAT, names(h), target = '01AF009')


## End(Not run)

floodnetProject16/floodnetRfa documentation built on Oct. 24, 2020, 9:19 a.m.