While trying to download data of a project, 2018_Iller, I get an additional warning at the end:
Warning messages:
1: In min.default(numeric(0), na.rm = FALSE) :
no non-missing arguments to min; returning Inf
2: In max.default(numeric(0), na.rm = FALSE) :
no non-missing arguments to max; returning -Inf
This is due to the fact that the project is empty, so no min or max date for detections can be returned:
message("* first date of detection: ", detections %>% summarize(min(as.Date(.data$date_time))) %>% pull())
message("* last date of detection: ", detections %>% summarize(max(as.Date(.data$date_time))) %>% pull())
I would fix it by adding a small if (nrow(detections) == 0) {}- else{} to embed these two lines of codes.
While trying to download data of a project,
2018_Iller
, I get an additional warning at the end:This is due to the fact that the project is empty, so no min or max date for
detections
can be returned:I would fix it by adding a small
if (nrow(detections) == 0) {}- else{}
to embed these two lines of codes.@peterdesmet: is it ok for you?