Hello, my name is Jorge.
I recently started working with the camtrapR package, specifically using the recordTable() function. I understand that it is possible to assign more than one species to the HierarchicalSubject tag, but I am facing an issue when trying to extract the maximum number of individuals per event (based on the defined minDeltaTime).
When working with a single species per image, I can use an additional metadata field (e.g., UserComment) to store the number of individuals, and then summarize it correctly using:
rt_all <- recordTable(
inDir = "C:/Prueba2/",
IDfrom = "metadata",
metadataSpeciesTag = "animal",
metadataHierarchyDelimitor = "|",
minDeltaTime = 30,
additionalMetadataTags = c("UserComment"),
eventSummaryColumn = "UserComment",
eventSummaryFunction = "max",
deltaTimeComparedTo = "lastIndependentRecord",
timeZone = "America/Argentina/Buenos_Aires",
removeDuplicateRecords = FALSE
)
In this case, UserComment contains the number of individuals and works as expected.
The issue arises when a single image contains two or more species. While I can include multiple species in HierarchicalSubject (separated by commas), I cannot do the same in UserComment, because recordTable() expects the eventSummaryColumn to be numeric.
Duplicating images to assign one species per file is also not a viable solution, since recordTable() removes duplicates (images with the same timestamp), especially when minDeltaTime > 0.
In summary, my question is:
Is there a way to work with multiple species per image in camtrapR while also correctly calculating the maximum number of individuals per species within the time window defined by minDeltaTime?
Any suggestions or alternative workflows would be greatly appreciated.
Thank you very much!