contin_import: Import continuous information from a template xlsx file.

View source: R/contin_import.R

contin_importR Documentation

Import continuous information from a template xlsx file.

Description

Retrieve monitoring results from Oregon DEQ's continuous data submission template version 2, 3, or volmon. This function will read the template and return a list with each list element holding a data frame of the information for each spreadsheet. Any rows with all NAs are removed.

Usage

contin_import(
  file,
  sheets = c("Organization_Details", "Projects", "Monitoring_Locations", "Deployment",
    "New_Equipment", "Results", "PrePost", "Audit_Data"),
  ver = 2,
  project = "ODEQVolMonWQProgram",
  timezone = "PDT",
  append_ordeq = TRUE
)

Arguments

file

The path and file name to template xlsx file.

sheets

Optional vector identifying sheets to import. Default is a vector of all sheets to be imported. Acceptable values include "Organization Details", "Projects", "Monitoring_Locations", "Deployment", "Results", "PrePost", "Audit_Data" and "New_Equipment" if ver=3.

ver

version of the template. Valid values are ver=2 (the default), ver=3, or "volmon". Default is ver=2.

project

Optional variable identifying project. Only used when ver="volmon". Default is project="ODEQVolMonWQProgram".

timezone

Optional variable setting time zone. Only used when ver="volmon". Default is timezone="PDT".

append_ordeq

Optional boolean to append "-ORDEQ" to monitoring locations. Only used when ver="volmon". Default is TRUE.

Details

The function returns a named list holding each worksheet from the xlsx. The name of each list element is the same as the xlsx:

  • Organization_Details

  • Projects

  • Monitoring_Locations

  • Deployment

  • New_Equipment (version 3 only)

  • Results

  • PrePost

  • Audit_Data

Column names are made into syntactically valid names acceptable by R.

This function relies heavily upon the readxl package.

Value

list of each continuous template data

See Also

read_excel


DEQrmichie/odeqcdr documentation built on Feb. 15, 2025, 10:01 a.m.