jniedballa / camtrapR

R package for camera trap data management
https://jniedballa.github.io/camtrapR/
31 stars 5 forks source link

surveyReport issue- camOp over multiple weeks #23

Closed ljakob12 closed 8 months ago

ljakob12 commented 10 months ago

Hello! I am trying to generate a survey report, but it is not producing the output tables and plots. There is a problem with the camop table, and I believe it is because I undertook my full surveying over 6 weeks, with cameras out 9 of the total 27 stations for 2 weeks (because I had limited equipment). Therefore, all stations have NAs in the table for the times over the total sample period when they did not have cameras deployed. Is there any fix around this?

The code and error message are below:

surveyreport_A23<-

  • surveyReport(
  • recordTable = recordTable_A23,
  • CTtable = CTtable_A23,
  • camOp = camoperation,
  • speciesCol = "Species",
  • stationCol = "Station",
  • setupCol= "Setup_date",
  • retrievalCol= "Retrieval_date",
  • CTDateFormat = "ymd",
  • recordDateTimeCol = "DateTimeOriginal",
  • recordDateTimeFormat = "ymd HMS",
  • sinkpath = "C:/Users/laure/OneDrive/Documents/PhD/Analysis/Camera/Survey reports",
  • makezip = TRUE) CTtable was converted from tibble to data.frame recordTable was converted from tibble to data.frame saved output to file C:/Users/laure/OneDrive/Documents/PhD/Analysis/Camera/Survey reports/survey_report_2023-10-25.txt

Error in (function (output, recordTable, CTtable, speciesCol, stationCol, : unused argument (camOp = c(0.5, NA, 0.5, NA, NA, NA, NA, 0.5, NA, NA, NA, NA, NA, 0.5, 0.5, 0, NA, NA, NA, NA, 0.5, 0.5, 0.5, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0, NA, NA, NA, NA, 1, 1, 1, NA, NA, NA, NA, 1, NA, 1, NA, NA, NA, NA, 1, NA, NA, NA, NA, NA, 1, 1, 0

jniedballa commented 9 months ago

Can you share a reproducible example please? Please also share your sessionInfo() and make sure the problem persists in the current GitHub version. Thank you.

ljakob12 commented 9 months ago

Thank you for your help! I am using the latest version of the package now and the function is working. Thank you again!