diff --git a/R/finbif_occurrence_load.R b/R/finbif_occurrence_load.R index af9ac475..e3bf6c3f 100644 --- a/R/finbif_occurrence_load.R +++ b/R/finbif_occurrence_load.R @@ -271,6 +271,14 @@ finbif_occurrence_load <- function( } + } else { + + select_user_keep <- !duplicated(select[["user"]]) + + select[["user"]] <- select[["user"]][select_user_keep] + + fb_occurrence_df <- fb_occurrence_df[, select_user_keep, drop = FALSE] + } attr(fb_occurrence_df, "file_cols") <- NULL @@ -379,7 +387,6 @@ finbif_occurrence_load <- function( } - select_user <- name_chr_vec(select[["user"]]) fb_occurrence_df <- fb_occurrence_df[, select_user, drop = FALSE] @@ -913,8 +920,6 @@ dt_read <- function(fb_occurrence_obj) { cols <- rownames(cols) - cols <- unique(cols) - if (file.exists(args[["input"]])) { cols <- do.call(data.table::fread, args) @@ -1554,8 +1559,6 @@ open_tsv_connection <- function(connection_obj) { vars <- rownames(vars) - vars <- unique(vars) - vars <- paste0(vars, collapse = "\t") textConnection(vars)