detectionHistory: Error: $ operator is invalid for atomic vectors

149 views
Skip to first unread message

lepa...@gmail.com

unread,
Jun 25, 2022, 6:45:34 PM6/25/22
to camtrapR
Dear group,
I´m trying to construct the detection history of a camera trap data set already in an excel/csv file, but I get this error when trying the "detectionHistory" function:

Error: $ operator is invalid for atomic vectors
In addition: Warning message:
timeZone is not specified. Assuming UTC

This is not the first time I used this code, and with other files it has worked in the past, but haven´t been able to make this one work. I am sure my input data is a dataframe (recordTable) and a matrix for CamOp, so not sure what atomic vector is this refering to.

Can anyone point me in the right direction to solve this issue?

Thank you very much in advanced
Lain  

Juergen Niedballa

unread,
Jun 26, 2022, 2:01:18 AM6/26/22
to camt...@googlegroups.com

Hi Lain,

would you mind sharing the code you used and a reproducible example please? It's easiest with an R workspace. You can subset to only a few records and stations, just make sure the error occurs. Also, are you using the recent CRAN version?

The error suggests there is the function tries to access a column of a data frame (via $), but the object is a vector and not a data frame. It is a bug, but I can't tell what exactly goes wrong without seeing the data.

Best regards,

Jürgen

--
You received this message because you are subscribed to the Google Groups "camtrapR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camtrapr+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/camtrapr/3b5b593a-18b0-401d-b31e-aaaa9c74f396n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages