makeSkinnyTimes: makeSkinnyTimes

View source: R/makeSkinnyTimes.r

makeSkinnyTimesR Documentation

makeSkinnyTimes

Description

Convert one of either the sun or moon wide rise and set times from table Dates from an Access CAMP database into a long skinny with only one time variable.

Usage

makeSkinnyTimes(rise, set, dates)

Arguments

rise

A text string describing the rise time from data frame dates. Either sun or moon rise times.

set

A text string describing the set time from data frame dates. Either sun or moon set times.

dates

A data frame copy of the table Dates from an Access CAMP database.

Details

Function makeSkinnyTimes simply converts datetime data in a wide format housed in two variables (a "rise" and "set") into one data frame with all datetime data in one column. This function prepares data frames for use with function getTimeProp, the true workhorse function.

Note that the temporal dates table is defined via the earliest and latest efficiency trial date for the run in question. To this, an additional month us appended at each end.

Value

A skinny data frame with one column housing datetimes, another to identify the "Event," i.e., a rise or set, and a third with all-NA trapVisitIDs.

Author(s)

WEST Inc.

See Also

getTimeProp

Examples

## Not run: 
rise <- "sunRise"
set <- "sunSet"
dates <- tblDates

sun <- makeSkinnyTimes(rise,set,dates)

## End(Not run)

tmcd82070/CAMP_RST documentation built on April 6, 2022, 12:07 a.m.