Error: stationCol = "Station" is not a column name in CTtable

20 views
Skip to first unread message

Neofelis Nebulosa

unread,
Oct 29, 2024, 5:46:39 PM10/29/24
to camtrapR
Hi Jurgen,

I was trying to run the function surveyReport() but have some issues. Since the name of the column containing camera stations in my CT table is "Names", I used that but it gives an error
report <- surveyReport(recordTable = sppRT,
                       CTtable = camtraps,
                       camOp = camop,
                       speciesCol = "Species",
                       stationCol = "Names",
                       setupCol = "Setup_2016",
                       retrievalCol = "Retrieval_2016",
                       CTDateFormat = "%d/%m/%Y",
                       recordDateTimeCol = "DateTimeOriginal",
                       recordDateTimeFormat = "ymd HMS"
                       )
Error: stationCol = "Names" is not a column name in recordTable

But I guess the column name is extracted from the CT table. Anyway, I used the column name from the species record table which is "Station". But again, when I do that, it gives me another error
report <- surveyReport(recordTable = sppRT,
                       CTtable = camtraps,
                       camOp = camop,
                       speciesCol = "Species",
                       stationCol = "Station",
                       setupCol = "Setup_2016",
                       retrievalCol = "Retrieval_2016",
                       CTDateFormat = "%d/%m/%Y",
                       recordDateTimeCol = "DateTimeOriginal",
                       recordDateTimeFormat = "ymd HMS"
                       )
Error: stationCol = "Station" is not a column name in CTtable

I have created surveyreports before but this never happened. Anything special with the recent version of camtrapR?

Will greatly appreciate your suggestions.

Thanks,
Yadav

Juergen Niedballa

unread,
Oct 30, 2024, 1:07:24 AM10/30/24
to camtrapR
Hi,

Based on the errors you're getting, it seems the column names for stations are different between your recordTable (sppRT) and CTtable (camtraps) - the station column is called "Station" in your recordTable but "Names" in your CTtable.

The surveyReport() function requires that the station column names match exactly between both input tables. This is because it needs to link records from the recordTable to the station information in CTtable.

This requirement for matching column names has been consistent across camtrapR versions - it's not specific to recent versions. The function needs to be able to match records to stations, so the station identifiers need to be consistent between the two input tables. So just rename either one of the columns and it should work.

Best regards,

Jürgen

Neofelis Nebulosa

unread,
Nov 4, 2024, 1:29:11 PM11/4/24
to camtrapR
Sorted, thank you!

Best,
Yadav

Reply all
Reply to author
Forward
0 new messages