align_var: Align variables in time

View source: R/sbe_modules.R

align_varR Documentation

Align variables in time

Description

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.

Usage

align_var(
  x,
  variables = "temperature",
  offset = -0.5,
  interp_method = "linear",
  na_rm = FALSE
)

Arguments

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.

Value

Returns an ctd object with offsets applied.

Author(s)

Sean Rohan


afsc-gap-products/gapctd documentation built on March 5, 2025, 3:42 a.m.