tidyTimeAtDepth: Apply 'tidy' data principles to the time-at-depth histogram...

View source: R/tidyTimeAtDepth.R

tidyTimeAtDepthR Documentation

Apply 'tidy' data principles to the time-at-depth histogram data stream

Description

tidyTimeAtDepth returns a 'tidy'd' data frame of time-at-depth data

Usage

tidyTimeAtDepth(histos)

Arguments

histos

a list returned from read_histos

Details

The histogram data stream is provided in a 'wide' format (each row represents a time period and the observed values are provided in 1 to 72 'bin' columns). This format can be difficult to work with in R and other data analysis platforms (e.g. database tables), so we use the tidyr and dplyr packages to manipulate the data into a more flexible, 'narrow' format. This results in a data structure where every row represents a single observation.

This is implemented, here, with the time-at-depth data. For time-at-depth data, the tag records the portion of time the tag spent within user-defined dive depth bins. This, unlike with timeline data, requires some knowledge of these user-specified bins. As long as the user has uploaded a configuration/report file to the Wildlife Computers Data Portal, then the *-Histos.csv file provides information on the time-at-depth bins. If the bin information is not available, the function will produce a warning and output files with generic 'Bin' labels.

Value

a tibble with tidy, narrow data structure and actual time-at-depth bin limits (when provided)


jmlondon/wcUtils documentation built on March 19, 2024, 8:40 a.m.