Learn R Programming

EGRET (version 2.3.0)

readUserDaily: Import user daily data for EGRET analysis

Description

Imports data from a user-supplied file, and converts it to a Daily data frame, appropriate for WRTDS calculations.

Usage

readUserDaily(filePath, fileName, hasHeader = TRUE, separator = ",",
  qUnit = 1, interactive = TRUE)

Arguments

filePath
character specifying the path to the file
fileName
character name of file to open
hasHeader
logical true if the first row of data is the column headers
separator
character character that separates data cells
qUnit
number 1 is cubic feet per second, 2 is cubic meters per second, 3 is 10^3 cubic feet per second, and 4 is 10^3 cubic meters per second
interactive
logical Option for interactive mode. If true, there is user interaction for error handling and data checks.

Value

  • A data frame 'Daily' with the following columns: lll{ Name Type Description Date Date Date Q numeric Discharge in m^3/s Julian integer Number of days since Jan. 1, 1850 Month integer Month of the year [1-12] Day integer Day of the year [1-366] DecYear numeric Decimal year MonthSeq integer Number of months since January 1, 1850 Qualifier character Qualifying code i integer Index of days, starting with 1 LogQ numeric Natural logarithm of Q Q7 numeric 7 day running average of Q Q30 numeric 30 day running average of Q }

Examples

Run this code
filePath <- system.file("extdata", package="EGRET")
fileName <- "ChoptankRiverFlow.txt"
Daily <- readUserDaily(filePath,fileName,separator="\t")

Run the code above in your browser using DataLab