ExportDailyValuesToCSV: ExportDailyValuesToCSV

View source: R/ExportDailyValuesToCSV.R

ExportDailyValuesToCSVR Documentation

ExportDailyValuesToCSV

Description

This function exports daily values output by the importDVs function to a CSV file.

Usage

ExportDailyValuesToCSV(dailyValues, fileName, metric = TRUE)

Arguments

dailyValues

daily values output by the importDVs in the waterData package

fileName

file name to save CSV file to

metric

convert value to metric

Details

This function outputs to the working directory. The directory can be set with the setwd command.

This function only supports discharge data.

Examples


site = list(
   staid = "02131000",                     # site number
   code = "00060",                         # code for discharge 
   stat = "00003",                         # code for mean   
)

DailyValues <- do.call(importDVs, site)

ExportDailyValuesToCSV(DailyValues, 
                       paste0("Daily_Values_for_Site_", site$staid))


Agriculturist/waterDataSupport documentation built on Jan. 28, 2023, 11:43 a.m.