DDFImport {UKFE} | R Documentation |
DDF13 or DDF22 results from .xml files
Description
Imports the depth duration frequency 2013 or 2022 results from xml files either from an FEH webservice download or from the Peakflows dataset downloaded from the national river flow archive (NRFA) website
Usage
DDFImport(x, ARF = FALSE, Plot = TRUE, DDFVersion = 22)
Arguments
x |
the xml file path |
ARF |
logical argument with a default of FALSE. If TRUE, the areal reduction factor is applied to the results. If FALSE, no area reduction factor is applied |
Plot |
logical argument with a default of TRUE. If TRUE the DDF curve is plotted for a few return periods |
DDFVersion |
Version of the DDF model (numeric). either 22 or 13. The default is 22. |
Details
This function returns a data-frame of results. For further durations and return periods the separate DDF function can be applied with the data-frame as the argument/input. File paths for importing data require forward slashes. On some operating systems, such as windows, the copy and pasted file paths will have backward slashes and would need to be changed accordingly.
Value
A data frame of DDF results (mm) with columns for duration and rows for return period. If Plot equals TRUE a DDF plot is also returned.
Author(s)
Anthony Hammond
Examples
#Import DDF22 results from a NRFA peakflows xml file and display in console
## Not run: DDF22.4003 <- DDFImport("C:/Data/NRFAPeakFlow_v11/Suitable for QMED/04003.xml")
## Not run: DDF22.4003
#Import DDF22 results from a FEH webserver xml file and display in the console
## Not run: DDF22.MySite <- DDFImport("C:/Data/FEH_Catchment_384200_458200.xml")