How to control the so-called "occasionEndTime" in camtrapR

13 views
Skip to first unread message

李治霖

unread,
Apr 3, 2024, 6:12:55 AMApr 3
to camtrapR
Hi  Jürgen,

I want to know how to set the occasionEndTime when computing the detection history. Beacuse I only notice the "day1" argument in spatialDetectionHistory. For example, I have the data of 2020, 2021 and 2022. If I want to get detection history of 2021, I can set day1= 2021-01-01, but how to set the end time of 2021-12-31? Thank you !

cheers,

Zhilin Li 

Jarrad Barnes

unread,
Apr 4, 2024, 12:19:32 AMApr 4
to camtrapR
There's nothing in the vignettes that shows this is an argument included in detectionHistory(). It might be easiest to manually amend your record database to omit the dates you don't want. Alternatively, you could set a date-range for Problem1_from and Problem1_to to incorporate these dates and then detectionHistory() should ignore anything after that date (you'll get warnings but it should still work).

Jarrad Barnes

unread,
Apr 4, 2024, 12:21:23 AMApr 4
to camtrapR
Alternatively alternatively, if you set your detectionHistory() "datesAsOccasionNames" argument to TRUE you can just omit the necessary columns from your detection history.
On Wednesday 3 April 2024 at 20:12:55 UTC+10 李治霖 wrote:

李治霖

unread,
Apr 4, 2024, 10:11:18 PMApr 4
to camtrapR
Thanks a lot! Setting  "datesAsOccasionNames" to TRUE is a very good idea!

Zhilin 

Juergen Niedballa

unread,
Apr 19, 2024, 1:52:42 AMApr 19
to camtrapR
Hi,
sorry for the late reply. Some additional options are:
- modify setup / retrieval dates of the camera trap table as needed (e.g. first/last day of a year, repeated for each year)
- use the parameter maxNumberDays in the detectionHistory() function to restrict the total duration (but that does not provide a hard cutoff at year's end, instead only a maximum number of days after setup)

But the trick with datesAsOccasionNames is probably the easiest solution here.
Reply all
Reply to author
Forward
0 new messages