screenData: Screen Data for Completeness

View source: R/screenData.R

screenDataR Documentation

Screen Data for Completeness

Description

Screens data to determine if a value is reported for each date by calendar or water year.

Usage

screenData(dates, values, type = "DV", year = "calendar", printit = TRUE)

Arguments

dates

the sequence of dates for each value in values.

values

the sequence of observations.

type

the frequency of values. Only daily values ("DV") and intermittent, or discrete, values ("IV") are accepted in this version. The whole text is required, but not case sensitive.

year

the type of year: "calendar" or "water," which begins on October 1 of the previous calendar year and ends on September 30.

printit

logical, if TRUE, then print the results in an

Details

Missing values are permitted in either dates or values. Those missing values are tallied in the completeness of record.

Value

For type = "DV," a matrix of the counts of missing values, either coded as NA or not in the dataset, for each month and each year within the range of dates.

For type = "IV," a matrix of the counts of observed values for each month and each year within the range of dates.

References

This function is based on the screen program described in:
Rutledge, A.T., 2007, Program user guide for RECESS: at https://water.usgs.gov/ogw/recess/UserManualRECESS.pdf.

Examples

library(smwrData)
data(Q05078770)
# this should indicate no missing values.
with(Q05078770, screenData(DATES, FLOW))
# There should be missing values shown for:
#months 10-12 in water year 2003 (October - December, 2002), and
#months 1-9 of water year 2004.  
with(Q05078770, screenData(DATES, FLOW, year="w"))

USGS-R/smwrBase documentation built on Oct. 18, 2022, 9:55 a.m.