Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

argfix

Reshape list elements to match that of the first element


Description

This is mainly used within gsw, to ensure that arguments sent to the C functions are of equal length. This is a convenience, for processing data that often have this condition. For example, a CTD profile is likely to have many values for SP, t, and p, but just a single value for each of longitude and latitude. It is important to call argfix() to handle such cases, because otherwise the underlying C code will be looking past the end of the vectors storing longitude and latitude, which can yield odd results or even segmentation faults.

Usage

argfix(list)

Arguments

list

A list of elements, typically arguments that will be used in GSW functions.

Value

A list with all elements of same shape (length or dimension).


gsw

Gibbs Sea Water Functions

v1.0-5
GPL (>= 2) | file LICENSE
Authors
Dan Kelley [aut, cre, cph] (C wrapper plus R code, tests, and documentation), Clark Richards [aut, cph] (C wrapper plus R code, tests, and documentation), WG127 SCOR/IAPSO [aut, cph] (Original 'Matlab' and derived code)
Initial release
2017-08-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.