read_ecdf: Read and Tidy ECDF Data File

View source: R/read_ecdf.R

read_ecdfR Documentation

Read and Tidy ECDF Data File

Description

This function is the workhorse of the 'wcECDF' package. All ECDF data are stored within a '*-ECDHistos.csv' file that is output from either the Wildlife Computers Data Portal or DAP processing software. The function presumes the '*-ECDHistos.csv' data file is provided as-is from these sources and has not been edited. The resulting output is a nested 'tibble' that adheres to tidy data principles and includes new columns ('shallow_ecdf', 'deep_ecdf', 'full_ecdf', and 'full_pdf'.

Usage

read_ecdf(ecdf_csv)

Arguments

ecdf_csv

file path for the '*-ECDHistos.csv'

Details

In addition to *tidying* up the original data into a more workable *long* format, this function calculates four new columns.

**shallow_ecdf** The 'shallow_ecdf' column is a list-col that contains nested S3 objects of class 'wcECDF' representing the portion of the water column defined as 'shallow'.

**deep_ecdf** The 'deep_ecdf' column is a list-col that contains nested S3 objects of class 'wcECDF' representing the portion of the water column defined as 'deep'.

**full_ecdf** The combined ECDF for both shallow and deep regions. The resulting ECDF is weighted based on the reported proportion of time spent within each region.

**full_pdf** The 'full_ecdf' is transformed into a probability density function and two columns are returned: 'pdf' and 'prob'. The later represents the probability the tag spent time at a given depth.

Value

A nested tibble


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