Learn R Programming

HyMETT (version 1.1.3)

POR_calc_amp_and_phase: Calculate the seasonal amplitude and phase of a daily time series

Description

Calculates the seasonal amplitude and phase of a daily time series.

Usage

POR_calc_amp_and_phase(
  data = NULL,
  Date,
  value,
  time_step = c("daily", "monthly")
)

Value

A data.frame with calculated seasonal amplitude and phase

Arguments

data

'data.frame'. Optional data.frame input, with columns containing Date and value. Column names are specified as strings in the corresponding parameter. Default is NULL.

Date

'numeric' vector of Dates corresponding to each value when data = NULL, or 'character' string identifying Date column name when data is specified.

value

'numeric' vector of values (often streamflow) when data = NULL, or 'character' string identifying value column name when data is specified. Assumed to be daily or monthly.

time_step

'character' value. Either "daily" or "monthly", Default is "daily".

References

Farmer, W.H., Archfield, S.A., Over, T.M., Hay, L.E., LaFontaine, J.H., and Kiang, J.E., 2014, A comparison of methods to predict historical daily streamflow time series in the southeastern United States: U.S. Geological Survey Scientific Investigations Report 2014–5231, 34 p. [Also available at https://doi.org/10.3133/sir20145231.]

Examples

Run this code
POR_calc_amp_and_phase(data = example_obs, Date = "Date", value = "streamflow_cfs")

Run the code above in your browser using DataLab