Skip to content

Commit

Permalink
fix getSetWithIDs and getSetWithoutIds
Browse files Browse the repository at this point in the history
  • Loading branch information
sdgamboa committed Jan 17, 2024
1 parent ebf6a6a commit b20514b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/taxPPro.R
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ getSetWithIDs <- function(tbl) {
Attribute_value = mean(cbind(.data$Attribute_value_min, .data$Attribute_value_max))
) |>
# dplyr::mutate(Attribute_value = mean(Attribute_value)) |>
dplyr::slice_max(
.data$Confidence_in_curation, n = 1, with_ties = FALSE
) |>
dplyr::ungroup() |>
dplyr::select(-Attribute_value_min, -Attribute_value_max) |>
dplyr::distinct() |>
Expand Down Expand Up @@ -355,6 +358,9 @@ getSetWithoutIDs <- function(tbl, set_with_ids = NULL) {
Attribute_value = mean(cbind(.data$Attribute_value_min, .data$Attribute_value_max))
) |>
# dplyr::mutate(Attribute_value = mean(Attribute_value)) |>
dplyr::slice_max(
.data$Confidence_in_curation, n = 1, with_ties = FALSE
) |>
dplyr::ungroup() |>
dplyr::select(-Attribute_value_min, -Attribute_value_max) |>
dplyr::distinct() |>
Expand Down

0 comments on commit b20514b

Please sign in to comment.