deltaStorage: Calculates changes in storage over specified intervals

View source: R/deltaStorage.R

deltaStorageR Documentation

Calculates changes in storage over specified intervals

Description

Calculates changes in storage over specified intervals

Usage

deltaStorage(
  CRHMdataframe = NULL,
  columns = 1,
  period = "yearly",
  startMonth = 10,
  useSecondYear = TRUE,
  logfile = ""
)

Arguments

CRHMdataframe

Required. A standard CRHM data frame.

columns

Required. The columns to be differenced, not including the datetime. The default is the first column. The columns can be a single number or a vector, i.e. c(1,2,3).

period

Required. The period of aggregation. Must be one of hourly, daily, monthly, yearly (or annual) or hydro. Default is yearly.

startMonth

Optional. Starting month, to be used when differencing by hydrological year. Default is 10 (October).

useSecondYear

Optional. Logical. Should the hydrological year be based on the first or second calendar year. In other words would January 1, 2015 be the hydrological year 2014 or 2015? The default is TRUE (i.e., the hydrological year would be 2015).

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Note

The period of diferencing must be greater than the time step of the CRHM data. This function does NOT remove NA values before aggregation. Use na.omit or one of the infilling functions (interpolate or impute) if you want to remove missing values.

Author(s)

Kevin Shook

See Also

simpleDailyWater

Examples

## Not run: delta <- deltaStorage(crhm, c(23,24,25))

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.