Learn R Programming

TideHarmonics (version 0.1-1)

plagtz: Convert Phase Lag

Description

Converts phase lags between different time zones. Mainly for internal use.

Usage

plagtz(plag, tzd, indegree = TRUE, outdegree = TRUE)

Arguments

plag
A named numeric vector of phase lags, where the names must correspond to the harmonic components. The names must be those used by this package, which are in the first column of the harmonics object.
tzd
The time difference in hours. For example, when converting from UTC to Australian Eastern Standard Time (AEST), this value must be positive 10.
indegree
If FALSE, the plag phase lags are in radians. Degrees are assumed by default.
outdegree
If FALSE, the returned phase lags are in radians. Degrees are produced by default.

Value

A numeric vector. By convention, phase lags are given in the interval [0,360] for degrees or [0,2pi] for radians.

See Also

ftide, coef.tide

Examples

Run this code
pvec <- c(M2 = 34.2, S2 = 256.8)
plagtz(pvec, tzd = 10)

Run the code above in your browser using DataLab