Skip to content

Commit

Permalink
Make ts_f4ratio pick up named list elements as column values
Browse files Browse the repository at this point in the history
  • Loading branch information
bodkan committed Mar 18, 2024
1 parent 694e5a2 commit 0571a60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/tree-sequences.R
Expand Up @@ -1904,11 +1904,11 @@ ts_f4ratio <- function(ts, X, A, B, C, O, mode = c("site", "branch"), span_norma
mode <- match.arg(mode)

purrr::map_dfr(
X, function(.x) {
seq_along(X), function(i) {
alpha <-
ts_f4(ts, A, O, .x, C, mode = mode)$f4 /
ts_f4(ts, A, O, X[i], C, mode = mode)$f4 /
ts_f4(ts, A, O, B, C, mode = mode)$f4
dplyr::tibble(X = .x, A = concat(A), B = concat(B),
dplyr::tibble(X = concat(X[i]), A = concat(A), B = concat(B),
C = concat(C), O = concat(O), alpha)
}
)
Expand Down

0 comments on commit 0571a60

Please sign in to comment.