readDataFromFile: Basic Data Import for Water Flow Data

Description Usage Arguments Value Examples

Description

Imports data from user-supplied data file. Specifically used to import water flow data for use in the EGRET package. For EGRET usage, the first column is expected to be dates. If the data is daily data, then next column is expected to be the measured values. If the data is sampled data, the next column is remark codes, and the third column is values.

Usage

1
readDataFromFile(filePath, fileName, hasHeader = TRUE, separator = ",")

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

Value

retval dataframe with dateTime, value, and code columns

Examples

1
2
3
filePath <- system.file("extdata", package="EGRET")
fileName <- 'ChoptankRiverFlow.txt'
ChopData <- readDataFromFile(filePath,fileName, separator="\t")

EGRET documentation built on Jan. 25, 2022, 5:08 p.m.