View source: R/makeSkinnyTimes.r
makeSkinnyTimes | R Documentation |
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.
makeSkinnyTimes(rise, set, dates)
rise |
A text string describing the rise time from data frame
|
set |
A text string describing the set time from data frame
|
dates |
A data frame copy of the table |
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.
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
trapVisitID
s.
WEST Inc.
getTimeProp
## Not run: rise <- "sunRise" set <- "sunSet" dates <- tblDates sun <- makeSkinnyTimes(rise,set,dates) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.