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", "project"),
rematchGPS = TRUE,
gpsGroup = NULL
)
x |
dataframe of deteciton 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 |
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.