From 7761d29fee0e3b60dde99c45eae40ea7b495c417 Mon Sep 17 00:00:00 2001 From: Pieter Huybrechts <48065851+PietrH@users.noreply.github.com> Date: Fri, 3 Nov 2023 15:09:06 +0100 Subject: [PATCH] also add taxonIDReference if missing when downconverting --- R/zzz.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/R/zzz.R b/R/zzz.R index 422dce8a..5e026c9e 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -827,7 +827,13 @@ convert_observations_to_0.1.6 <- function(package, from = "1.0") { observations <- observations %>% dplyr::select(-dplyr::starts_with("bbox")) # add taxonID if missing if(!"taxonID" %in% colnames(observations)){ - observations <- observations %>% dplyr::mutate(taxonID = NA_integer_) + observations <- observations %>% + dplyr::mutate(taxonID = NA_integer_) + } + # add taxonIDReference if missing + if(!"taxonIDReference" %in% colnames(observations)){ + observations <- observations %>% + dplyr::mutate(taxonIDReference = NA_character_) } package$data$observations <- observations