importPeakFQ: Import Data from PeakFQ Output

Description Usage Arguments Details Value Examples

Description

The importPeakFQ function reads output directly from PeakFQ and prepares it for use in WREG-R.

Usage

1
importPeakFQ(pfqPath, gisFile, sites = "")

Arguments

pfqPath

A directory that contains all of PeakFQ files for each site in the GIS file. Files can be contained in the main path or in subdirectories of pfqPath. Each site should be represented by one and only one .EXP and .PRT file.

gisFile

A tab-delimited text file that contains a matrix whose rows represent the sites and contains columns that include ‘Station.ID’, ‘Lat’, ‘Long’ and any other variables to be used for analysis.

sites

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

Details

This functions allows users to read output directly from PeakFQ without the need to manipulate additional files. The site selection is driven by the sites in the GIS table.

Value

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

sites

A vector of site IDs.

Y

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

AEP

A vector of annual exceedance probabilities associated with the columns of Y.

X

A matrix 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.

MSEGR

The mean-squared-error in the regional skew.

recLen

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

recCor

A matrix of the correlaiton between site paris.

Examples

1
2
3
4
5
peakFQdir <- paste0(
  file.path(system.file("exampleDirectory", package = "WREG"),
    "pfqImport"))
gisFilePath <- file.path(peakFQdir, "pfqSiteInfo.txt")
importedData <- importPeakFQ(pfqPath = peakFQdir, gisFile = gisFilePath)

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