Skip to content

Commit

Permalink
fix deleted_cases not work
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Nov 6, 2023
1 parent cfa371e commit 7920385
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/dedup.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ methods::setMethod("faers_dedup", "FAERSascii", function(object, remove_deleted_
}
if (isTRUE(remove_deleted_cases)) {
deleted_cases <- faers_deleted_cases(object)
if (length(deleted_cases)) {
if (!length(deleted_cases)) {
deleted_cases <- NULL
}
} else {
Expand Down Expand Up @@ -173,7 +173,7 @@ dedup_faers_ascii <- function(data, deleted_cases = NULL) {
out <- unique(out, by = "caseid")
# test code
# Following codes are based on
# https://stackoverflow.com/questions/69366291/copy-only-one-variable-from-one-r-data-table-to-another-after-matching-on-a-vari
# https://stackoverflow.com/questions/69366291/copy-only-one-variable-from-one-r-data-table-to-another-after-matching-on-a-vari
# which should be memory efficient
# a <- data.table::data.table(
# id = rep(letters[1:2], 5),
Expand Down

0 comments on commit 7920385

Please sign in to comment.