Skip to content

Commit

Permalink
pre-branching updates
Browse files Browse the repository at this point in the history
  • Loading branch information
TGuillerme committed Nov 23, 2023
1 parent 0e41fd9 commit 8a8c3e3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
Binary file added src/bitwise.dist.o
Binary file not shown.
Binary file added src/char.diff.o
Binary file not shown.
Binary file added src/dispRity.so
Binary file not shown.
Binary file added src/registerDynamicSymbol.o
Binary file not shown.
46 changes: 23 additions & 23 deletions tests/testthat/test-dispRity.utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ test_that("get.tree with subsets", {
edgelabels()
tiplabels()
tiplabels(simple_tree$tip.label, adj = -1, col = "blue")
abline(v = c(0, 1, 2, 3, 3.5), col = "grey", lty = 2)
abline(v = c(0, 1, 2, 3, 3.8), col = "grey", lty = 2)
dev.new()
tree <- simple_tree

Expand Down Expand Up @@ -897,40 +897,40 @@ test_that("get.tree with subsets", {



chrono.subset.tree <- function(subset_n, data, to.root) {
# chrono.subset.tree <- function(subset_n, data, to.root) {

slice.type <- data$call$subsets[[1]]
age <- as.numeric(strsplit(names(data$subsets[subset_n]), split = " - ")[[1]])
# slice.type <- data$call$subsets[[1]]
# age <- as.numeric(strsplit(names(data$subsets[subset_n]), split = " - ")[[1]])

## Time bin/slice behaviour
if(slice.type %in% c("discrete", "continuous")) {
if(to.root) {
# ## Time bin/slice behaviour
# if(slice.type %in% c("discrete", "continuous")) {
# if(to.root) {

slice.tree(data$tree[[1]], age = age[2], model = "acctran")
# slice.tree(data$tree[[1]], age = age[2], model = "acctran")

## Maybe test this one?
# paleotree::timeSliceTree
# ## Maybe test this one?
# # paleotree::timeSliceTree

slice.tree(tree, age, model, FAD, LAD)
# slice.tree(tree, age, model, FAD, LAD)

## cut the trees to the upper bound
return(output)
} else {
if(!to.root && slice.type == "discrete") {
## cut the trees to the upper and lower bounds
return(output)
# ## cut the trees to the upper bound
# return(output)
# } else {
# if(!to.root && slice.type == "discrete") {
# ## cut the trees to the upper and lower bounds
# return(output)




}
}
}
# }
# }
# }

## Out
return(output)
# ## Out
# return(output)

}
# }


# # ## BUG when using a matrix with just one column! (empty subsets)
Expand Down

0 comments on commit 8a8c3e3

Please sign in to comment.