View source: R/merge_camtrapdp.R
merge_camtrapdp | R Documentation |
Merges two Camera Trap Data Package objects into one.
merge_camtrapdp(x, y)
x , y |
Camera Trap Data Package objects, as returned by
|
A single Camera Trap Data Package object that is the combination of
x
and y
.
Both x
and y
must have a unique dataset name x$name
and y$name
.
This name is used to prefix identifiers in the data that occur in both
datasets.
For example:
x
contains deploymentID
s c("a", "b")
.
y
contains deploymentID
s c("b", "c")
.
Then merged xy
will contain deploymentID
s c("a", "x_b", "y_b", "c")
.
Data are merged as follows:
Deployments are combined, with deploymentID
kept unique.
Media are combined, with mediaID
, deploymentID
and eventID
kept
unique.
Observations are combined, with observationID
, deploymentID
, mediaID
and eventID
kept unique.
Additional resources are retained, with the resource name kept unique.
Metadata properties are merged as follows:
name: Removed.
id: Removed.
created: Set to current timestamp.
title: Removed.
contributors: Combined, with duplicates removed.
description: Combined as two paragraphs.
version: Set to 1.0
.
keywords: Combined, with duplicates removed.
image: Removed.
homepage: Removed.
sources: Combined, with duplicates removed.
licenses: Combined, with duplicates removed.
bibliographicCitation: Removed.
project$id: Removed.
project$title: Combined.
project$acronym: Removed.
project$description: Combined as two paragraphs.
project$path: Removed.
project$samplingDesign: Sampling design of x
.
project$captureMethod: Combined, with duplicates removed.
project$individuals: TRUE
if one of the datasets has TRUE
.
project$observationLevel: Combined, with duplicates removed.
coordinatePrecision: Set to the least precise coordinatePrecision
.
spatial: Reset based on the new deployments.
temporal: Reset based on the new deployments.
taxonomic: Combined, with duplicates removed.
relatedIdentifiers: Combined, with duplicates removed.
references: Combined, with duplicates removed.
Custom properties of x
are also retained.
Other transformation functions:
round_coordinates()
,
shift_time()
,
write_dwc()
,
write_eml()
x <- example_dataset() %>%
filter_deployments(deploymentID %in% c("00a2c20d", "29b7d356"))
y <- example_dataset() %>%
filter_deployments(deploymentID %in% c("577b543a", "62c200a9"))
x$name <- "x"
y$name <- "y"
merge_camtrapdp(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.