Learn R Programming

UKFE (version 0.1.1)

ImportCDs: Import catchment descriptors from .CD3 files

Description

Imports catchment descriptors from CD3 files either from an FEH webservice download or from the Peakflows dataset downloaded from the national river flow archive (NRFA) website

Usage

ImportCDs(x, web = TRUE)

Arguments

x

the CD3 file path

web

logical argument with a default of TRUE. TRUE is to be used to import CDs from a FEH webserver downloaded CD3 file. FALSE is to be used to import CDs from a peak flows dataset CD3 file

Value

A data.frame with columns; Descriptor and Value.

Details

The CD3 files downloaded from the FEH webserver are formatted differently from the CD3 files of the peak flows dataset. For this reason it is necessary to specify web as TRUE or FALSE. TRUE indicates an FEH webserver derived CD3 and FALSE indicates a peak flows dataset CD3. 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.

Examples

Run this code
# NOT RUN {
#Import catchment descriptors from a NRFA peakflows CD3 file and display in console
# }
# NOT RUN {
CDs.4003 <- ImportCDs("C:/Data/NRFAPeakFlow_v9/Suitable for QMED/4003.CD3", web = FALSE)
# }
# NOT RUN {
CDs.4003
# }
# NOT RUN {
#Import catchment descriptors from a FEH webserver CD3 file and display CDs in the console
# }
# NOT RUN {
CDs.MySite <- ImportCDs("C:/Data/FEH_Catchment_384200_458200.CD3")
# }

Run the code above in your browser using DataLab