From bbcb3fda8fd5ba9d9af4edfd8c563037be2dbe11 Mon Sep 17 00:00:00 2001 From: Pieter Huybrechts <48065851+PietrH@users.noreply.github.com> Date: Fri, 3 Nov 2023 14:13:45 +0100 Subject: [PATCH] Downconvert taxonID to NA Co-Authored-By: Peter Desmet --- R/zzz.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/zzz.R b/R/zzz.R index 328aefa5..92e1075b 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -823,6 +823,10 @@ convert_observations_to_0.1.6 <- function(package, from = "1.0") { } # remove bounding box related cols if present observations <- observations %>% dplyr::select(-dplyr::starts_with("bbox")) + # add taxonID if missing + if(!"taxonID" %in% colnames(observations)){ + observations <- observations %>% dplyr::mutate(taxonID = NA_integer_) + } package$data$observations <- observations return(package)