Learn R Programming

oce (version 0.1-80)

predict.tidem: Predict a time series from a tidal model

Description

Predict a time series from a tidal model.

Usage

## S3 method for class 'tidem':
predict(object, ...)

Arguments

object
a tidem object.
...
optional arguments passed on to children.

Value

  • A vector of predictions.

Details

This is a wrapper around the predict method for object$model.

See Also

tidem fits a tidal model.

Examples

Run this code
library(oce)
data(sealevel.tuk)
tide <- tidem(sealevel.tuk)
plot(sealevel.tuk$data$time, sealevel.tuk$data$elevation, type='l', ylim=c(-2,5))
lines(sealevel.tuk$data$time, sealevel.tuk$data$elevation - predict(tide), col="red")
abline(h=0, col="red")

Run the code above in your browser using DataLab