add_event_times: Add times of events (UTC or seconds_since)

View source: R/add_event_times.R

add_event_timesR Documentation

Add times of events (UTC or seconds_since)

Description

Add time (in seconds since tagon or datetimes in UTC and/or local timezone) to a tibble or data-frame with event times (conversion between datetime and seconds_since_tagon formats)

Usage

add_event_times(x, start_x, tagon_time)

Arguments

x

input data frame: vector, tibble, or data frame. There should be one column that gives either seconds_since_tagon or UTC time already present.

start_x

name of the variable in x that gives the times

tagon_time

string giving the tag recording start time (or the info sensor data structure). Can be found in tag_dataset$info$dephist_device_datetime_start. Format: day month year hours minutes seconds.

Value

The input x, but with additional column(s) sec_since_tagon with times in seconds since start of tag recording or utc_time (plus optionally local_time). Note, this function adds UTC times; if you want local times in addition, consider using utc_to_local after this function.

Examples

# # Examples will go here

stacyderuiter/FBtagtools documentation built on June 1, 2025, 6:26 p.m.