Hello,
I am not sure what is happening here and would need some reproducible code to check.
For now, please first install the latest dev version from github:
remotes::install_github("jniedballa/camtrapR", ref = "dev", build_vignettes = TRUE)
The dev version offers a simpler way of creating a list of detection histories for use as input to community models. You can simply pass a vector of species to the "species" parameter and it will automatically return a list if it has more than one species. So there's no need to use the lapply() workaround anymore.
For example:
species_to_include <- unique(recordTableSample$Species) # includes all species in dataset
DetHist_list <- detectionHistory(
recordTable = recordTableSample,
camOp = camop_no_problem,
stationCol = "Station",
speciesCol = "Species",
recordDateTimeCol = "DateTimeOriginal",
species = species_to_include,
occasionLength = 7,
day1 = "station",
datesAsOccasionNames = FALSE,
includeEffort = TRUE,
scaleEffort = TRUE,
timeZone = "Asia/Kuala_Lumpur"
)
If the error persists please share a reproducible example to show the discrepancy.
Thank you.