Skip to contents

When stap contains a stap_id column, values are returned on that scale. Otherwise, find_stap() returns row-based indices 1:nrow(stap). For dates in flight gaps between two consecutive stationary periods, the returned value is linearly interpolated between the two neighbouring stationary periods, yielding decimal stap_id.

Usage

find_stap(stap, date)

Arguments

stap

a data.frame with columns start and end defining stationary periods, and optionally stap_id.

date

a POSIXct vector of datetimes to map to stationary periods.

Value

Numeric vector of stap_id values (fractional values for in-flight gaps).