importWREG: Import Data from Old WREG Format

Description Usage Arguments Details Value Examples

Description

The importWREG function reads the WREG inputs from a directory set up for the old WREG program.

Usage

1
importWREG(wregPath, sites = "")

Arguments

wregPath

A directory that contains all of the files needed to implement the MatLab version of WREG.

sites

(optional) A vetor of sites that should be return. Allows for data subsetting.

Details

This functions allows users to use the legacy format of WREG. This includes an established directory that contains valid “SiteInfo.txt”, “FlowChar.txt”, “LP3G.txt”, “LP3K.txt”, “LP3s.txt” and “USGS##########.txt”, multiple files containing time series for each site. The file “UserWLS.txt” is optional. For further information on the format of these files, see the program manual (Techniques and Methods 4-A8). Files that are not valid inputs files for the WREG version describe therein will not be accepted.

Value

All outputs are returned as part of a list. The list includes:

sites

A vector of site IDs.

Y

A data frame whose comlumns represent unique frequency events, while the row represent particular sites in the same order as sites.

X

A data frame whose columns represent basin characteristics to be used as dependent variables and whose rows represent sites corresponding to sites.

LP3f

A matrix containing the fitted LP# parameters that are fixed across exceedence probability. These include the standard deviation, skew and regional skew for each site.

LP3k

A matrix of the fitted kappa parameters of the LP3 distribution for each AEP.

BasChars

A matrix containing the site IDs, latitudes and longitudes.

recLen

A square matrix indicating the number of overlapping years for each site pair.

recCor

A matrix of the correlaiton between site paris.

UW

A matrix of user weights, if included.

Examples

1
2
3
wregDir <- file.path(system.file("exampleDirectory", package = "WREG"),
 "matlabImport")
importedData <- importWREG(wregPath = wregDir)

USGS-R/WREG documentation built on May 9, 2019, 6:48 p.m.