Learn R Programming

dataRetrieval (version 1.4.0)

getUserInfo: Import Metadata from User-Generated File

Description

Populates INFO data frame for EGRET study. Accepts a user generated file with any metadata that might be important for the analysis. Additionally, EGRET analysis requires:"drainSqKm", "staAbbrev", "constitAbbrev", "param.units", "paramShortName","shortName". If interactive=TRUE, the function will ask for these fields if they aren't supplied in the file.

Usage

getUserInfo(filePath, fileName, hasHeader = TRUE, separator = ",",
  interactive = FALSE)

Arguments

filePath

string specifying the path to the file

fileName

string name of file to open

hasHeader

logical true if the first row of data is the column headers

separator

string character that separates data cells

interactive

logical Option for interactive mode. If true, there is user interaction for error handling and data checks.

Value

INFO dataframe with agency, site, dateTime, value, and code columns

Examples

Run this code
# NOT RUN {
filePath <- system.file("extdata", package="dataRetrieval")
filePath <- paste(filePath,"/",sep="")
fileName <- 'infoTest.csv'
INFO <- getUserInfo(filePath,fileName, separator=",",interactive=FALSE)
# }

Run the code above in your browser using DataLab