View source: R/loadDetectionData.R
loadDetectionData | R Documentation |
Loads and formats detection data into a common format for use in other PAMscapes functions
loadDetectionData(
x,
source = c("makara", "csv"),
columnMap = NULL,
detectionType = c("auto", "presence", "detection"),
presenceDuration = NULL,
dateFormat = c("%Y-%m-%dT%H:%M:%S+0000", "%Y-%m-%d %H:%M:%S",
"%m-%d-%Y %H:%M:%S", "%Y/%m/%d %H:%M:%S", "%m/%d/%Y %H:%M:%S"),
tz = "UTC",
wide = FALSE,
speciesCols = NULL,
detectedValues = NULL,
extraCols = NULL,
...
)
x |
dataframe or path to CSV file containing detection data |
source |
source of the detection data, choices other than "csv" just specify specific formatting options |
columnMap |
a list or data.frame specifying how to map the input
column names to the required standard names of "UTC", "end", and "species".
If a list, must be a named list where the names are the standardized
column names and the values are the existing names, e.g.
|
detectionType |
one of "auto", "presence", or "detection" specifying the type of detection in the data. "presence" means hourly or daily presence style of detections - the duration of the detection is used for the time unit (e.g. hourly presence might have "UTC" value 2020-01-01 12:00:00 and "end" value 2020-01-01 13:00:00 for a detection). "detection" means the data refer to specific detections or bouts of detections rather than just presence. "auto" means that the type of detection will be inferred from the start and end time of each detection - any detections with a duration of exactly one hour or exactly one day will be marked as "presence", any other duration will be marked as "detection" |
presenceDuration |
if |
dateFormat |
format string of dates, see strptime. Can be a vector of multiple formats |
tz |
time zone of input data |
wide |
logical flag indicating whether the input data has species
detection information in wide (instead of long) format. If |
speciesCols |
only used if |
detectedValues |
only used if |
extraCols |
(optional) any additional columns to keep with the output |
... |
additional arguments used for certain |
a dataframe with columns UTC, end, species, and detectionType, where each row represents a single detection event. May have additional columns depending on other parameters
Taiki Sakai taiki.sakai@noaa.gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.