Skip to content

Commit

Permalink
also add taxonIDReference if missing when downconverting
Browse files Browse the repository at this point in the history
  • Loading branch information
PietrH committed Nov 3, 2023
1 parent 5f210ef commit 7761d29
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7761d29

Please sign in to comment.