View source: R/binDetectionData.R
| binDetectionData | R Documentation |
Transforms detection data to presence-type data with user specified time bin (e.g. hourly or daily presence).
binDetectionData(
x,
bin,
columns = c("species"),
rematchGPS = TRUE,
gpsGroup = NULL,
warnSpread = TRUE
)
x |
dataframe of detection data |
bin |
the amount time to bin by, must be a character of the form
|
columns |
names of the columns in |
rematchGPS |
logical flag, if |
gpsGroup |
the name of the column in |
warnSpread |
logical flag to issue a warning about spreading "presence" type detections across multiple output rows (e.g. one row of daily presence turning into 24 rows of hourly presence) |
a dataframe where each row represents detection presence of one time unit
Taiki Sakai taiki.sakai@noaa.gov
dets <- data.frame(
UTC = as.POSIXct(c('2020-04-04 12:20:00', '2020-04-04 12:40:00', '2020-04-04 13:20:00')),
species = c('whale', 'whale', 'dolphin'),
call = c('a', 'b', 'c'))
# two rows of outputs
binDetectionData(dets, bin='1hour', columns='species')
# adding "call" creates 3 rows of outputs
binDetectionData(dets, bin='1hour', columns=c('species', 'call'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.