daily_tidal_mean: Daily Tidal Mean

Description Usage Arguments Value

View source: R/smooth.r

Description

Compute the daily low-tide or high-tide average.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
daily_tidal_mean(
  x,
  y,
  tide = c("high", "low"),
  smooth = TRUE,
  neighborhood = 24,
  family = "symmetric",
  degree = 2,
  ...,
  plot = FALSE
)

Arguments

x

A vector of values from a single day.

y

A vector of water surface elevations from a single day.

tide

Return the high-tide ("high") or low-tide ("low") average.

smooth

If TRUE, A loess smoother will be applied to the data prior to detecting the water surface elevation minimums or maximums.

neighborhood

The neighborhood (number of points) used to determine the span argument to stats::loess(). A time window of 6 hours was found to work well with tidal data, which corresponds to 24 points for 15-minute data or 6 points for hourly data.

family

The family argument to stats::loess(). The default family "symmetric" was found to work well with 15-minute tidal data.

degree

The degree argument to stats::loess(). The default degree of 2 was found to work well with 15-minute tidal data.

...

Additional arguments to stats::loess().Note that the value of span is computed from the argument neighborhood.

plot

If TRUE, printdiagnostic plots of the loess smoothing.

Value

The daily tidal mean of x, i.e. the average of high- or low-tide values for the day.


SuisunMarshBranch/wqptools documentation built on May 1, 2021, 2:21 a.m.