averageCtds: Average a list of CTD objects.

View source: R/calculations.R

averageCtdsR Documentation

Average a list of CTD objects.

Description

Average and list of CTD objects. This function will take all available data within all of the ctd objects and will average in pressure space. It takes all unique pressure values from all ctd objects, and then averages all availble data for each unique pressure values. Therefore, it's best if the data have already been vertically averaged.

Usage

averageCtds(x, bin = NULL, tolerance = NULL)

Arguments

x

a list of ctd objects

bin

an optional vector of numerical values of the center of the bin to average the data

tolerance

an optional vector of numerical values of the tolerance for the bin

Details

There are three different schemes for averaging based on which combination of bin and tolerance is supplied. If bin = tolerance = NULL, then profiles are averaged by unique pressure values in all of the ctd profiles. If bin and tolerance are supplied, then the data is averaged using the supplied values such that intervals are closed on the left and open on the right. If bin is supplied and tolerance = NULL then the data is averaged by combining cut() and split(), and for consistency to other schemes the intervals are closed on the left and open on the right.

Value

a ctd object that has the same metadata and processing log as the supplied ctd object, but with bin-averaged data.

Author(s)

Chantelle Layton


clayton33/csasMarPhys documentation built on June 8, 2025, 3:10 a.m.