Error: timeZone must be an element of OlsonNames()

15 views
Skip to first unread message

NW

unread,
Jun 19, 2024, 6:43:37 AM6/19/24
to camtrapR
Hi all,
I am trying to identify independent detection events from a record table created else where. Upon running filterRecordTable I am getting the following error.
> library(remotes) > install_github("jniedballa/camtrapR")
> library(camtrapR) This is camtrapR 2.3.0 (CURRENT) > setwd("~/R/NM Data") > #Datasets#### > site_information <- read.csv("ErskineSurvey_2023-2024_DeploymentSummary.csv", header = TRUE, fileEncoding="UTF-8-BOM") > sp_data <- read.csv("Erskine23-24_ImageFlatFile_Test1.csv", header = TRUE, fileEncoding="UTF-8-BOM") > #Convert time to POSIXct format > sp_data$timestamp <- as.POSIXct(sp_data$timestamp, format = "%Y-%m-%d %H:%M:%S") > IndependentDetections<-filterRecordTable(recordTable = sp_data, + minDeltaTime = 60, + deltaTimeComparedTo = "lastIndependentRecord", + speciesCol = "common_name", + stationCol = "deployment_id", + camerasIndependent = TRUE, + recordDateTimeCol = "timestamp", + recordDateTimeFormat = "ymd HMS", + removeDuplicateRecords = TRUE, + writecsv = FALSE, + timeZone = "Australia/Perth",) Error: timeZone must be an element of OlsonNames() > #Test if in Olson > is.element( "Australia/Perth", OlsonNames()) [1] TRUE
sessionInfo() R version 4.4.0 (2024-04-24 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 11 x64 (build 22631) Matrix products: internal locale: [1] LC_COLLATE=English_Australia.utf8 LC_CTYPE=English_Australia.utf8 LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C [5] LC_TIME=English_Australia.utf8 time zone: Australia/Darwin tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] camtrapR_2.3.0 remotes_2.5.0 loaded via a namespace (and not attached): [1] utf8_1.2.4 generics_0.1.3 class_7.3-22 KernSmooth_2.23-22 stringi_1.8.4 lattice_0.22-6 magrittr_2.0.3 [8] grid_4.4.0 timechange_0.3.0 Matrix_1.7-0 secr_4.6.7 e1071_1.7-14 DBI_1.2.3 mgcv_1.9-1 [15] fansi_1.0.6 scales_1.3.0 codetools_0.2-20 abind_1.4-5 cli_3.6.2 rlang_1.1.4 units_0.8-5 [22] munsell_0.5.1 splines_4.4.0 RcppNumerical_0.6-0 tools_4.4.0 raster_3.6-26 parallel_4.4.0 dplyr_1.1.4 [29] colorspace_2.1-0 ggplot2_3.5.1 curl_5.2.1 vctrs_0.6.5 R6_2.5.1 proxy_0.4-27 lifecycle_1.0.4 [36] lubridate_1.9.3 classInt_0.4-10 stringr_1.5.1 MASS_7.3-60.2 pkgconfig_2.0.3 RcppParallel_5.1.7 terra_1.7-78 [43] pillar_1.9.0 gtable_0.3.5 data.table_1.15.4 glue_1.7.0 Rcpp_1.0.12 sf_1.0-16 xfun_0.44 [50] tibble_3.2.1 tidyselect_1.2.1 rstudioapi_0.16.0 knitr_1.47 nlme_3.1-164 compiler_4.4.0 sp_2.1-4

I have seen this issue arise a couple of times in this forum but haven't found a solution yet. 
Any help is much appreciated.
Cheers
Nick

Juergen Niedballa

unread,
Jun 19, 2024, 6:56:00 AM6/19/24
to camtrapR
Hello,
this is odd and I don't understand the issue yet. Can you please:
1) confirm it also happens with the dev version from github:
(install_github("jniedballa/camtrapR", ref = "dev")
2) if the error also happens in the dev version, would you mind sharing a subset of your data (a few records only, enough to reproduce the error) as an R workspace here or via email to the maintainer please, along with the exact code that produces the error?

Thank you
Reply all
Reply to author
Forward
0 new messages