Skip to content
Snippets Groups Projects
getSampleDataFromFile.Rd 1.12 KiB
Newer Older
  • Learn to ignore specific revisions
  • Laura A DeCicco's avatar
    Laura A DeCicco committed
    \name{getSampleDataFromFile}
    \alias{getSampleDataFromFile}
    \title{Import Sample Data for WRTDS}
    \usage{
      getSampleDataFromFile(filePath, fileName,
        hasHeader = TRUE, separator = ",", interactive = TRUE)
    }
    \arguments{
      \item{filePath}{string specifying the path to the file}
    
      \item{fileName}{string name of file to open}
    
      \item{hasHeader}{logical true if the first row of data is
      the column headers}
    
      \item{separator}{string character that separates data
      cells}
    
      \item{interactive}{logical Option for interactive mode.
      If true, there is user interaction for error handling and
      data checks.}
    }
    \value{
      Sample dataframe
    }
    \description{
      Imports data from a user-supplied file, and converts it
      to a Sample data frame, appropriate for WRTDS
      calculations.
    }
    \examples{
    # Examples of how to use getSampleDataFromFile:
    # Change the file path and file name to something meaningful:
    
    Laura A DeCicco's avatar
    Laura A DeCicco committed
    filePath <- '~/RData/'  # Sample format
    
    Laura A DeCicco's avatar
    Laura A DeCicco committed
    fileName <- 'ChoptankRiverNitrate.csv'
    
    Laura A DeCicco's avatar
    Laura A DeCicco committed
    #Sample <- getSampleDataFromFile(filePath,fileName, separator=";",interactive=FALSE)
    
    Laura A DeCicco's avatar
    Laura A DeCicco committed
    }
    
    \keyword{USGS}
    \keyword{WRTDS}
    
    Laura A DeCicco's avatar
    Laura A DeCicco committed
    \keyword{data}
    \keyword{file}
    \keyword{import}