Skip to content

Commit

Permalink
ws
Browse files Browse the repository at this point in the history
  • Loading branch information
ms609 committed Jun 24, 2024
1 parent 4fdf37e commit 0fd222d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/median.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,13 @@ median.multiPhylo <- function(x, na.rm = FALSE,
} else {
chosen <- distances == min(distances)
if (index) {
which(chosen)
which(chosen)
} else {
if (sum(chosen) == 1L) x[[which(chosen)]] else x[chosen]
if (sum(chosen) == 1L) {
x[[which(chosen)]]
} else {
x[chosen]
}
}
}
}

0 comments on commit 0fd222d

Please sign in to comment.