Skip to content

Commit

Permalink
Update add_timed_transition.R
Browse files Browse the repository at this point in the history
  • Loading branch information
caravagn committed Nov 2, 2023
1 parent b5015f1 commit abee6e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/add_timed_transition.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ add_genotype_evolution = function(x,
x$simulation$add_timed_mutation(genotype_from, genotype_to, time)

x$species = x$species %>%
mutate(
dplyr::mutate(
ancestor = ifelse(
genotype == genotype_to,
genotype_from,
Expand All @@ -52,9 +52,9 @@ add_genotype_evolution = function(x,
)

df = x$species %>%
select(ancestor, genotype, time) %>%
distinct %>%
rename(from = ancestor, to = genotype)
dplyr::select(ancestor, genotype, time) %>%
dplyr::distinct %>%
dplyr::rename(from = ancestor, to = genotype)

which_roots = df %>% dplyr::filter(is.na(from)) %>% pull(to)

Expand Down

0 comments on commit abee6e6

Please sign in to comment.