align_var | R Documentation |
Offset variables in time to account for lags in sensor responses. Variables are interpolated so offsets do not need to be multiples of the scan interval.
align_var(
x,
variables = "temperature",
offset = -0.5,
interp_method = "linear",
na_rm = FALSE
)
x |
ctd object |
variables |
Character vector of data variable names to offset. |
offset |
Numeric vector of offsets (in seconds) to add. |
interp_method |
Method for interpolating data when offsets are not a multiple of the scan interval (e.g., interpolation is necessary for a 0.55 second offset if an instrument has a 0.25 second scan interval). See ?approx |
na_rm |
Remove scans with NAs in variable channel(s) after alignment. |
Returns an ctd object with offsets applied.
Sean Rohan
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.