Problem with duplicates with RecordTable

14 views
Skip to first unread message

Gabriel Naudet

unread,
May 16, 2024, 1:54:17 AMMay 16
to camtrapR
Hello,

I'm triyng to use the function RecordTable for showing activity of arboreal mammals but i have some dificulties with.
I want events independent of 30 minutes, and despite this, I still have data that are less than 30 minutes apart in the results.
Do you know why ? Is it a date encoding issue?

This is my code and the result :

df_obs_ce <- recordTable(
  inDir = BDD_PHOTOS,
  IDfrom = "metadata",
  cameraID = "filename",
  camerasIndependent = TRUE,
  minDeltaTime = 30,
  deltaTimeComparedTo = "lastIndependentRecord",
  timeZone = "America/Cayenne",
  stationCol = "Station",
  writecsv = TRUE,
  outDir = "D:/OneDrive - BIOTOPE/02_Projet Amazonie/2024_Pont_singes_Saint-Georges/10_Rstudio/Table_obs",
  metadataHierarchyDelimitor = "|",
  metadataSpeciesTag = "Animalia",
  removeDuplicateRecords = TRUE,
  returnFileNamesMissingTags = TRUE,
  eventSummaryColumn = "summary",
  eventSummaryFunction = "sum"
)

Thanks you for your help,

Gabriel
Table.jpg

Juergen Niedballa

unread,
May 16, 2024, 1:56:50 AMMay 16
to camtrapR
Hello,
would you mind sharing a small subdataset please to reproduce the problem? It is odd that the delta_time columns show Inf. This suggests that the calculation of the time difference is failing, but I can't tell why.
Feel free to share privately via email. A few photos from one station will do.
Best regards

Gabriel Naudet

unread,
May 28, 2024, 2:45:38 AMMay 28
to camtrapR
Hello Juergen, 

thanks you for your answer. There is some photos of my dataset : https://drive.google.com/drive/folders/1LXDcqsL9v-eqMTDBCuOTxUWfapD790KP?usp=sharing

Have a good week-end

Juergen Niedballa

unread,
Jun 1, 2024, 3:49:05 AMJun 1
to camtrapR
Hello,
this problem seems to be due to cameraID = "filename". The filenames in the data you shared are generic (e.g. DSCF0011.jpg) and don't include station/ camera information, but you provide argument cameraID = "filename". Hence camera IDs could not be extracted and that caused trouble when the function tried to sort by camera IDs and didn't catch this unforeseen situation.

It works as expected when I simplify the code to:

df_obs_ce30 <- recordTable(
  inDir = "...",
  IDfrom = "metadata",

  minDeltaTime = 30,
  deltaTimeComparedTo = "lastIndependentRecord",
  timeZone = "America/Cayenne",
  metadataSpeciesTag = "Animalia",
)

I modified the Github dev version to give a meaningful error for your original code: "Failed to extract camera ID from filename"

Best regards
Reply all
Reply to author
Forward
0 new messages