oceanwaves provides a set of functions to calculate summary statistics for ocean waves, using a record of sea surface elevation as input. For sea surface elevations derived from bottom-mounted pressure transducers, the package also contains a function prCorr() to correct for depth attenuation of the pressure signal, and the swDepth() function from the package oce can be used to convert pressure data into ocean surface elevations (see the included package vignette).

waveStatsSP() produces wave height and period statistics using spectral analysis methods, while waveStatsZC() calculates additional wave height and period statistics based on a zero-crossing algorithm.

See the package vignette for example workflows to proceed from raw pressure data to summary wave statistics.

Pressure corrections and wave statistics functions were adapted from Urs Neumeier’s waves functions for MATLAB, developed from earlier work by Travis Mason and Magali Lecouturier.

The release version of this package can be obtained from To install this package within R, run the following at the R command line:


To install the development version of this package from within R, first install the package devtools and then install this package from Github: