From 5f44b9f79daf7ba4564f36683e01ac91b2dc5ae8 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:10:01 +0100 Subject: [PATCH 01/30] Require R3.6 --- .github/workflows/R-CMD-check.yml | 15 ++++++++++++++- DESCRIPTION | 4 ++-- NEWS.md | 6 ++++++ tests/testthat/test-CustomSearch.R | 2 -- tests/testthat/test-Jackknife.R | 1 - tests/testthat/test-pp-random-tree.R | 3 --- tests/testthat/test-zzz-tree-rearrange.R | 2 -- vignettes/profile.Rmd | 1 - vignettes/tree-search.Rmd | 1 - 9 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index 3935d785b..a523a6b71 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -47,8 +47,8 @@ jobs: config: - {os: windows-latest, r: 'release'} - {os: macOS-latest, r: 'release'} + - {os: ubuntu-20.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-20.04, r: '4.1', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} # Until TreeDist can slough phangorn - #- {os: ubuntu-20.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} @@ -79,8 +79,21 @@ jobs: if: runner.os == 'macOS' run: | brew install libgit2 xquartz ghostscript + + - name: Set up R dependencies (R 3.6) + if: matrix.config.r == '3.6' + uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: | + evaluate@0.23 + knitr@1.45 + rjson@0.2.20 + XML@3.99-0.3 + needs: | + check - name: Set up R dependencies + if: matrix.config.r != '3.6' uses: r-lib/actions/setup-r-dependencies@v2 with: needs: | diff --git a/DESCRIPTION b/DESCRIPTION index 7877fd1dc..e4771c456 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: TreeSearch Title: Phylogenetic Analysis with Discrete Character Data -Version: 1.5.1 +Version: 1.5.1.9000 Authors@R: c( person( "Martin R.", 'Smith', @@ -32,7 +32,7 @@ Description: Reconstruct phylogenetic trees from discrete data. URL: https://ms609.github.io/TreeSearch/ (doc), https://github.com/ms609/TreeSearch/ (devel) BugReports: https://github.com/ms609/TreeSearch/issues/ -Depends: R (>= 3.5.0) +Depends: R (>= 3.6.0) Imports: ape (>= 5.6), cli (>= 3.0), diff --git a/NEWS.md b/NEWS.md index 01a62acf5..92863ea3f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# TreeSearch 1.5.1.9000 (2024-08) + +- Support for ordered (additive) characters +- Require R 3.6 (to simplify maintenance) + + # TreeSearch 1.5.1 (2024-05-23) - Fix calls to `DescendantEdges()` diff --git a/tests/testthat/test-CustomSearch.R b/tests/testthat/test-CustomSearch.R index 71fb5995b..fde6520d7 100644 --- a/tests/testthat/test-CustomSearch.R +++ b/tests/testthat/test-CustomSearch.R @@ -10,7 +10,6 @@ RootySwappers <- list(RootedTBRSwap, RootedSPRSwap, RootedNNISwap) test_that("Tree can be found", { skip_if_not_installed("phangorn") phy11 <- phangorn::phyDat(data11, type = "USER", levels = c(FALSE, TRUE)) - suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(1) random11 <- as.phylo(17905853L, 11, letters[1:11]) expect_error(TreeSearch(unrooted11, dataset = phy11)) @@ -110,7 +109,6 @@ test_that("Profile parsimony works in tree search", { dataset <- TreeTools::PhyDat(sillyData) readyData <- PrepareDataProfile(dataset) - suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(0) rTree <- randomTree <- RandomTree(dataset, "1") diff --git a/tests/testthat/test-Jackknife.R b/tests/testthat/test-Jackknife.R index 85fed2a5a..8771cc42d 100644 --- a/tests/testthat/test-Jackknife.R +++ b/tests/testthat/test-Jackknife.R @@ -11,7 +11,6 @@ test_that("Jackknife supports are correct", { expect_error(Jackknife(start_tree, dataset, resampleFreq = 0)) expect_error(Jackknife(start_tree, dataset, resampleFreq = 9/10)) - suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(0) strict <- TreeSearch(start_tree, dataset, verbosity = 0) diff --git a/tests/testthat/test-pp-random-tree.R b/tests/testthat/test-pp-random-tree.R index e1d93fdf2..385003335 100644 --- a/tests/testthat/test-pp-random-tree.R +++ b/tests/testthat/test-pp-random-tree.R @@ -38,7 +38,6 @@ test_that("four-tip trees are randomly distributed", { }) test_that("four-tip trees are randomly scored", { - suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(0) nTrees <- 6000 @@ -57,7 +56,6 @@ test_that("four-tip trees are randomly scored", { }) test_that("five-tip trees are randomly scored", { - suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(0) nTrees <- 6000 stringency <- 0.005 @@ -75,7 +73,6 @@ test_that("five-tip trees are randomly scored", { test_that("six-tip trees are randomly scored", { - suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(0) nTrees <- 6000 diff --git a/tests/testthat/test-zzz-tree-rearrange.R b/tests/testthat/test-zzz-tree-rearrange.R index 0cf235f99..447026f23 100644 --- a/tests/testthat/test-zzz-tree-rearrange.R +++ b/tests/testthat/test-zzz-tree-rearrange.R @@ -46,7 +46,6 @@ test_that("NNI works", { Test(2, 0, 3, 9) Test(2, 1, 8, 9) - suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(0) nniComb <- NNI(trComb) expect_equal(nniComb$tip.label, trComb$tip.label) @@ -252,7 +251,6 @@ CheckTreeSanity <- function (tree) { expect_true(all(child[!tips] > parent[!tips]), info="Parent nodes must be > child nodes") } -suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(0) small_tree <- rtree(8) large_tree <- rtree(80) diff --git a/vignettes/profile.Rmd b/vignettes/profile.Rmd index b30b76acf..f8469d22d 100644 --- a/vignettes/profile.Rmd +++ b/vignettes/profile.Rmd @@ -42,7 +42,6 @@ In order to reproduce the random elements of this document, set a random seed: ```{R rng-version} # Set a random seed so that random functions in this document are reproducible -suppressWarnings(RNGversion("3.5.0")) # Until we can require R3.6.0 set.seed(888) ``` diff --git a/vignettes/tree-search.Rmd b/vignettes/tree-search.Rmd index 5bf02b4a5..1456f15aa 100644 --- a/vignettes/tree-search.Rmd +++ b/vignettes/tree-search.Rmd @@ -75,7 +75,6 @@ vinther <- TreeSearch::inapplicable.phyData[["Vinther2008"]] ```{R RNG-version} # Set a random seed so that random functions in this document are reproducible -suppressWarnings(RNGversion("3.5.0")) # Until we require R v3.6.0 set.seed(0) ``` From 2d534122048ad8c89ba8c1e3245d124d52f74faf Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:16:33 +0100 Subject: [PATCH 02/30] dataset via ReadCharacters() --- man-roxygen/datasetParam.r | 1 + man/AdditionTree.Rd | 3 ++- man/CharacterLength.Rd | 3 ++- man/ConcordantInformation.Rd | 3 ++- man/Consistency.Rd | 3 ++- man/MaximizeParsimony.Rd | 3 ++- man/PlotCharacter.Rd | 3 ++- man/SiteConcordance.Rd | 3 ++- man/SuccessiveApproximations.Rd | 3 ++- man/TaxonInfluence.Rd | 3 ++- man/TreeLength.Rd | 3 ++- man/TreeSearch.Rd | 3 ++- 12 files changed, 23 insertions(+), 11 deletions(-) diff --git a/man-roxygen/datasetParam.r b/man-roxygen/datasetParam.r index a2c73a71a..5038c6a27 100644 --- a/man-roxygen/datasetParam.r +++ b/man-roxygen/datasetParam.r @@ -1,3 +1,4 @@ #' @param dataset A phylogenetic data matrix of \pkg{phangorn} class #' \code{phyDat}, whose names correspond to the labels of any accompanying tree. +#' Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}. # Defined in TreeTools. Please propagate any changes there. diff --git a/man/AdditionTree.Rd b/man/AdditionTree.Rd index f212a690f..88fe9b76c 100644 --- a/man/AdditionTree.Rd +++ b/man/AdditionTree.Rd @@ -8,7 +8,8 @@ AdditionTree(dataset, concavity = Inf, constraint, sequence) } \arguments{ \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{concavity}{Numeric specifying concavity constant for implied step weighting. diff --git a/man/CharacterLength.Rd b/man/CharacterLength.Rd index 1e318e990..5f217f6c5 100644 --- a/man/CharacterLength.Rd +++ b/man/CharacterLength.Rd @@ -16,7 +16,8 @@ FastCharacterLength(tree, dataset) \item{tree}{A tree of class \code{\link{phylo}}.} \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{compress}{Logical specifying whether to retain the compression of a \code{phyDat} object or to return a vector specifying to each individual diff --git a/man/ConcordantInformation.Rd b/man/ConcordantInformation.Rd index c0699961c..b1d10935d 100644 --- a/man/ConcordantInformation.Rd +++ b/man/ConcordantInformation.Rd @@ -16,7 +16,8 @@ ConcordantInfo(tree, dataset) \item{tree}{A tree of class \code{\link{phylo}}.} \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} } \value{ \code{ConcordantInformation()} returns a named vector with elements: diff --git a/man/Consistency.Rd b/man/Consistency.Rd index 3bd55a753..2af757710 100644 --- a/man/Consistency.Rd +++ b/man/Consistency.Rd @@ -8,7 +8,8 @@ Consistency(dataset, tree, compress = FALSE) } \arguments{ \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{tree}{A tree of class \code{\link{phylo}}.} diff --git a/man/MaximizeParsimony.Rd b/man/MaximizeParsimony.Rd index a3fa74c8c..8de3f5d24 100644 --- a/man/MaximizeParsimony.Rd +++ b/man/MaximizeParsimony.Rd @@ -47,7 +47,8 @@ EasyTreesy() } \arguments{ \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{tree}{(optional) A bifurcating tree of class \code{\link{phylo}}, containing only the tips listed in \code{dataset}, from which the search diff --git a/man/PlotCharacter.Rd b/man/PlotCharacter.Rd index fe4494386..094859f81 100644 --- a/man/PlotCharacter.Rd +++ b/man/PlotCharacter.Rd @@ -25,7 +25,8 @@ PlotCharacter( \item{tree}{A tree of class \code{\link{phylo}}.} \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{char}{Index of character to plot.} diff --git a/man/SiteConcordance.Rd b/man/SiteConcordance.Rd index 6b627b473..784fe6317 100644 --- a/man/SiteConcordance.Rd +++ b/man/SiteConcordance.Rd @@ -23,7 +23,8 @@ SharedPhylogeneticConcordance(tree, dataset) \item{tree}{A tree of class \code{\link{phylo}}.} \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} } \description{ The site concordance factor \insertCite{Minh2020}{TreeSearch} is a measure diff --git a/man/SuccessiveApproximations.Rd b/man/SuccessiveApproximations.Rd index 100873516..774dc45b7 100644 --- a/man/SuccessiveApproximations.Rd +++ b/man/SuccessiveApproximations.Rd @@ -25,7 +25,8 @@ SuccessiveWeights(tree, dataset) \item{tree}{A tree of class \code{\link{phylo}}.} \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{outgroup}{if not NULL, taxa on which the tree should be rooted} diff --git a/man/TaxonInfluence.Rd b/man/TaxonInfluence.Rd index cee842a94..fdfe41d85 100644 --- a/man/TaxonInfluence.Rd +++ b/man/TaxonInfluence.Rd @@ -18,7 +18,8 @@ TaxonInfluence( } \arguments{ \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{tree}{Optimal tree or summary tree (of class "phylo") or list of trees (of class "list" or "multiPhylo") against which results should be evaluated. diff --git a/man/TreeLength.Rd b/man/TreeLength.Rd index 59dd07d0a..075a2b63c 100644 --- a/man/TreeLength.Rd +++ b/man/TreeLength.Rd @@ -30,7 +30,8 @@ Fitch(tree, dataset) uniformly sampled.} \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{concavity}{Determines the degree to which extra steps beyond the first are penalized. Specify a numeric value to use implied weighting diff --git a/man/TreeSearch.Rd b/man/TreeSearch.Rd index aec08cdc2..f6467e55e 100644 --- a/man/TreeSearch.Rd +++ b/man/TreeSearch.Rd @@ -53,7 +53,8 @@ DoNothing(...) - (optionally, if score provided) number of times this score has been hit} \item{dataset}{A phylogenetic data matrix of \pkg{phangorn} class -\code{phyDat}, whose names correspond to the labels of any accompanying tree.} +\code{phyDat}, whose names correspond to the labels of any accompanying tree. +Perhaps load into R using \code{\link[TreeTools]{ReadCharacters}}.} \item{TreeScorer}{function to score a given tree. The function will be passed three parameters, corresponding to the From 3c3d41fabe9c81d3193916f5164d54dd8ceca8c9 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:31:22 +0100 Subject: [PATCH 03/30] Still use RNGVersion Could in future re-seed. --- tests/testthat/test-CustomSearch.R | 2 ++ tests/testthat/test-Jackknife.R | 1 + tests/testthat/test-pp-random-tree.R | 4 +++- tests/testthat/test-zzz-tree-rearrange.R | 6 ++++-- vignettes/profile.Rmd | 1 + vignettes/tree-search.Rmd | 3 ++- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test-CustomSearch.R b/tests/testthat/test-CustomSearch.R index fde6520d7..fe2d418da 100644 --- a/tests/testthat/test-CustomSearch.R +++ b/tests/testthat/test-CustomSearch.R @@ -10,6 +10,7 @@ RootySwappers <- list(RootedTBRSwap, RootedSPRSwap, RootedNNISwap) test_that("Tree can be found", { skip_if_not_installed("phangorn") phy11 <- phangorn::phyDat(data11, type = "USER", levels = c(FALSE, TRUE)) + RNGversion("3.5.0") set.seed(1) random11 <- as.phylo(17905853L, 11, letters[1:11]) expect_error(TreeSearch(unrooted11, dataset = phy11)) @@ -109,6 +110,7 @@ test_that("Profile parsimony works in tree search", { dataset <- TreeTools::PhyDat(sillyData) readyData <- PrepareDataProfile(dataset) + RNGversion("3.5.0") set.seed(0) rTree <- randomTree <- RandomTree(dataset, "1") diff --git a/tests/testthat/test-Jackknife.R b/tests/testthat/test-Jackknife.R index 8771cc42d..aa198d39c 100644 --- a/tests/testthat/test-Jackknife.R +++ b/tests/testthat/test-Jackknife.R @@ -11,6 +11,7 @@ test_that("Jackknife supports are correct", { expect_error(Jackknife(start_tree, dataset, resampleFreq = 0)) expect_error(Jackknife(start_tree, dataset, resampleFreq = 9/10)) + RNGversion("3.5.0") set.seed(0) strict <- TreeSearch(start_tree, dataset, verbosity = 0) diff --git a/tests/testthat/test-pp-random-tree.R b/tests/testthat/test-pp-random-tree.R index 385003335..f210bacc3 100644 --- a/tests/testthat/test-pp-random-tree.R +++ b/tests/testthat/test-pp-random-tree.R @@ -38,7 +38,7 @@ test_that("four-tip trees are randomly distributed", { }) test_that("four-tip trees are randomly scored", { - set.seed(0) + RNGversion("3.5.0")set.seed(0) nTrees <- 6000 stringency <- 0.005 @@ -56,6 +56,7 @@ test_that("four-tip trees are randomly scored", { }) test_that("five-tip trees are randomly scored", { + RNGversion("3.5.0") set.seed(0) nTrees <- 6000 stringency <- 0.005 @@ -73,6 +74,7 @@ test_that("five-tip trees are randomly scored", { test_that("six-tip trees are randomly scored", { + RNGversion("3.5.0") set.seed(0) nTrees <- 6000 diff --git a/tests/testthat/test-zzz-tree-rearrange.R b/tests/testthat/test-zzz-tree-rearrange.R index 447026f23..432707315 100644 --- a/tests/testthat/test-zzz-tree-rearrange.R +++ b/tests/testthat/test-zzz-tree-rearrange.R @@ -46,6 +46,7 @@ test_that("NNI works", { Test(2, 0, 3, 9) Test(2, 1, 8, 9) + RNGversion("3.5.0") set.seed(0) nniComb <- NNI(trComb) expect_equal(nniComb$tip.label, trComb$tip.label) @@ -56,7 +57,7 @@ test_that("NNI works", { test_that("SPR works", { testTree <- Preorder(root(BalancedTree(7), 1, resolve.root = TRUE)) - edge <- testTree$edge + edge <- testTree[["edge"]] expect_equal(spr(edge, 66), cSPR(testTree, 66)$edge) Test <- function (m, p1, r1) { @@ -242,7 +243,7 @@ CheckTreeSanity <- function (tree) { info=paste0("Root is numbered ", min(parent), "; expecting ", nTip + 1) ) expect_false(min(parent) %in% child, - info=paste0("Root node (", min(parent), ") is child of edge ", paste0(which(min(parent) == child), collapse=', ')) + info=paste0("Root node (", min(parent), ") is child of edge ", paste0(which(min(parent) == child), collapse = ", ")) ) expect_true(all(seq_len(nTip) %in% child)) # No missing tips expect_equal(max(parent), nTip + nNode) @@ -251,6 +252,7 @@ CheckTreeSanity <- function (tree) { expect_true(all(child[!tips] > parent[!tips]), info="Parent nodes must be > child nodes") } +RNGversion("3.5.0") set.seed(0) small_tree <- rtree(8) large_tree <- rtree(80) diff --git a/vignettes/profile.Rmd b/vignettes/profile.Rmd index f8469d22d..ef2fd1389 100644 --- a/vignettes/profile.Rmd +++ b/vignettes/profile.Rmd @@ -42,6 +42,7 @@ In order to reproduce the random elements of this document, set a random seed: ```{R rng-version} # Set a random seed so that random functions in this document are reproducible +RNGversion("3.5.0") set.seed(888) ``` diff --git a/vignettes/tree-search.Rmd b/vignettes/tree-search.Rmd index 1456f15aa..4a85b19d7 100644 --- a/vignettes/tree-search.Rmd +++ b/vignettes/tree-search.Rmd @@ -73,8 +73,9 @@ escape from local optima. vinther <- TreeSearch::inapplicable.phyData[["Vinther2008"]] ``` -```{R RNG-version} +```{R RNG-version, warn = FALSE} # Set a random seed so that random functions in this document are reproducible +RNGversion("3.5.0") set.seed(0) ``` From b49059941726c3df78a515805be52abd30eeb6ca Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:31:49 +0100 Subject: [PATCH 04/30] ignore phangorn --- .github/workflows/R-CMD-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index a523a6b71..d40ea630c 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -87,6 +87,7 @@ jobs: extra-packages: | evaluate@0.23 knitr@1.45 + phangorn=?ignore-before-r=4.1.0 rjson@0.2.20 XML@3.99-0.3 needs: | From 6f7c21efb21548dae7b2dfd5842cdc7177177377 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:34:59 +0100 Subject: [PATCH 05/30] phangorn@2.7.1 --- .github/workflows/R-CMD-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index d40ea630c..2dca1b431 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -87,7 +87,7 @@ jobs: extra-packages: | evaluate@0.23 knitr@1.45 - phangorn=?ignore-before-r=4.1.0 + phangorn@2.7.1 rjson@0.2.20 XML@3.99-0.3 needs: | From 96c130b84685be088838bd14461d0c6ed44312ef Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:36:03 +0100 Subject: [PATCH 06/30] pandoc v2 --- .github/workflows/gcc-ASAN.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gcc-ASAN.yml b/.github/workflows/gcc-ASAN.yml index 61390a044..46245981d 100644 --- a/.github/workflows/gcc-ASAN.yml +++ b/.github/workflows/gcc-ASAN.yml @@ -66,7 +66,7 @@ jobs: - name: Setup pandoc if: ${{ matrix.config.test }} == 'vignettes' - uses: r-lib/actions/setup-pandoc@master + uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: | From 0e8cbfb310850161a6738fede02122c9497ed8af Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:37:16 +0100 Subject: [PATCH 07/30] rm dead link --- vignettes/getting-started.Rmd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vignettes/getting-started.Rmd b/vignettes/getting-started.Rmd index c1fdf5bb0..39c333b52 100644 --- a/vignettes/getting-started.Rmd +++ b/vignettes/getting-started.Rmd @@ -18,9 +18,8 @@ datasets. ### Simple installation To use "TreeSearch" you will first need to [install R](https://CRAN.R-project.org/). -[RStudio](https://posit.co/) -([overview](https://dss.princeton.edu/training/RStudio101.pdf)) is a popular -front-end that makes several of R's features easier to use. +[RStudio](https://posit.co/) is a popular front-end that makes several of R's +features easier to use. The "TreeSearch" package can be installed as any other package. To get the latest stable version from CRAN, type From 77dd2a9bc7c56a1f955d20fb6a6604c7b4e0f334 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:39:04 +0100 Subject: [PATCH 08/30] \r\n --- tests/testthat/test-pp-random-tree.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-pp-random-tree.R b/tests/testthat/test-pp-random-tree.R index f210bacc3..9272e563e 100644 --- a/tests/testthat/test-pp-random-tree.R +++ b/tests/testthat/test-pp-random-tree.R @@ -38,7 +38,8 @@ test_that("four-tip trees are randomly distributed", { }) test_that("four-tip trees are randomly scored", { - RNGversion("3.5.0")set.seed(0) + RNGversion("3.5.0") + set.seed(0) nTrees <- 6000 stringency <- 0.005 From 88c1477521c0bd2169a4a8b48a1814bd2eb5a4d0 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:01:54 +0100 Subject: [PATCH 09/30] Rfast@2.0.8 --- .github/workflows/R-CMD-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index 2dca1b431..c851917f9 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -88,6 +88,7 @@ jobs: evaluate@0.23 knitr@1.45 phangorn@2.7.1 + Rfast@2.0.8 rjson@0.2.20 XML@3.99-0.3 needs: | From 522d02b63b8a19656f9534cedc4529bd9c9f74ea Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:25:45 +0100 Subject: [PATCH 10/30] Try RFast 1.9.8 --- .github/workflows/R-CMD-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index c851917f9..0cefdaedd 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -88,7 +88,7 @@ jobs: evaluate@0.23 knitr@1.45 phangorn@2.7.1 - Rfast@2.0.8 + Rfast@1.9.8 rjson@0.2.20 XML@3.99-0.3 needs: | From 269e2f589c874e9fad1ee585d7900ef3f0eb266c Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:49:05 +0100 Subject: [PATCH 11/30] Crass manual implementation of palette.cols --- vignettes/tree-space.Rmd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vignettes/tree-space.Rmd b/vignettes/tree-space.Rmd index 76ad58b86..3d55d9fcd 100644 --- a/vignettes/tree-space.Rmd +++ b/vignettes/tree-space.Rmd @@ -259,6 +259,12 @@ nClusters <- length(unique(clustering)) Now we can map tree space into a few dimensions and visualise the distribution of trees: +```{r palette.colors, echo = FALSE} +if (packageVersion("base") < "4.0.0") { + # TODO delete when require R4.0 + palette.colors <- function(x) paste0(palette()[2:(x - 1)], "CC") +} +``` ```{r map-space, fig.keep = "none"} nDim <- 3 # Number of dimensions to plot From 9d4132232d133369423012139396dbd71a43b63e Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:49:56 +0100 Subject: [PATCH 12/30] Alphabet --- vignettes/tree-space.Rmd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vignettes/tree-space.Rmd b/vignettes/tree-space.Rmd index 3d55d9fcd..d0aa882bc 100644 --- a/vignettes/tree-space.Rmd +++ b/vignettes/tree-space.Rmd @@ -262,7 +262,11 @@ of trees: ```{r palette.colors, echo = FALSE} if (packageVersion("base") < "4.0.0") { # TODO delete when require R4.0 - palette.colors <- function(x) paste0(palette()[2:(x - 1)], "CC") + palette.colors <- function(x, ...) { + c("#AA0DFECC", "#3283FECC", "#85660DCC", "#782AB6CC", "#565656CC", +"#1C8356CC", "#16FF32CC", "#F7E1A0CC", "#E2E2E2CC", "#1CBE4FCC", +"#C4451CCC", "#DEA0FDCC")[seq_len(x)] + } } ``` From e93926d38df2641297aaf9b7300a6885fb74e6e5 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:11:30 +0100 Subject: [PATCH 13/30] dx.doi avoid redirect --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 474e49992..d1f66f364 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ Brazeau, M. D., Guillerme, T. and Smith, M. R. (2019). Faith D. P., Trueman J. W. H. (2001). Towards an inclusive philosophy for phylogenetic inference. Systematic Biology, 50(3), 331–350. - doi: [10.1080/10635150118627](https://doi.org/10.1080/10635150118627). + doi: [10.1080/10635150118627](https://dx.doi.org/10.1080/10635150118627). Farris, J. S. (1969). A successive approximations approach to character weighting. Systematic Biology, 18(4), 374–385. From d939c4b6f9fb7aa7ffd0c7650e9aa3f07c69f98b Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:14:20 +0100 Subject: [PATCH 14/30] RNGversion("3.6.0") --- tests/testthat/test-Jackknife.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-Jackknife.R b/tests/testthat/test-Jackknife.R index aa198d39c..b2058710b 100644 --- a/tests/testthat/test-Jackknife.R +++ b/tests/testthat/test-Jackknife.R @@ -11,7 +11,7 @@ test_that("Jackknife supports are correct", { expect_error(Jackknife(start_tree, dataset, resampleFreq = 0)) expect_error(Jackknife(start_tree, dataset, resampleFreq = 9/10)) - RNGversion("3.5.0") + RNGversion("3.6.0") set.seed(0) strict <- TreeSearch(start_tree, dataset, verbosity = 0) From e81d385bc54cc502cd53556d58eb5dd0249e99de Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:15:42 +0100 Subject: [PATCH 15/30] RNGVersion unnecessary --- tests/testthat/test-pp-random-tree.R | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/testthat/test-pp-random-tree.R b/tests/testthat/test-pp-random-tree.R index 9272e563e..385003335 100644 --- a/tests/testthat/test-pp-random-tree.R +++ b/tests/testthat/test-pp-random-tree.R @@ -38,7 +38,6 @@ test_that("four-tip trees are randomly distributed", { }) test_that("four-tip trees are randomly scored", { - RNGversion("3.5.0") set.seed(0) nTrees <- 6000 @@ -57,7 +56,6 @@ test_that("four-tip trees are randomly scored", { }) test_that("five-tip trees are randomly scored", { - RNGversion("3.5.0") set.seed(0) nTrees <- 6000 stringency <- 0.005 @@ -75,7 +73,6 @@ test_that("five-tip trees are randomly scored", { test_that("six-tip trees are randomly scored", { - RNGversion("3.5.0") set.seed(0) nTrees <- 6000 From a1a78f622c8f04ec2eb6898ee3a3b31c00c4ec37 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:19:43 +0100 Subject: [PATCH 16/30] suppressWarnings(RNGversion("3.5.0")) --- tests/testthat/test-zzz-tree-rearrange.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-zzz-tree-rearrange.R b/tests/testthat/test-zzz-tree-rearrange.R index 432707315..566870d8b 100644 --- a/tests/testthat/test-zzz-tree-rearrange.R +++ b/tests/testthat/test-zzz-tree-rearrange.R @@ -46,7 +46,7 @@ test_that("NNI works", { Test(2, 0, 3, 9) Test(2, 1, 8, 9) - RNGversion("3.5.0") + suppressWarnings(RNGversion("3.5.0")) set.seed(0) nniComb <- NNI(trComb) expect_equal(nniComb$tip.label, trComb$tip.label) @@ -252,7 +252,7 @@ CheckTreeSanity <- function (tree) { expect_true(all(child[!tips] > parent[!tips]), info="Parent nodes must be > child nodes") } -RNGversion("3.5.0") +suppressWarnings(RNGversion("3.5.0")) set.seed(0) small_tree <- rtree(8) large_tree <- rtree(80) From 72ec9d069d75d686e44d94c6f274affc9820878e Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:19:46 +0100 Subject: [PATCH 17/30] {} --- R/NNI.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/NNI.R b/R/NNI.R index df79879a5..d4be1bcff 100644 --- a/R/NNI.R +++ b/R/NNI.R @@ -93,8 +93,12 @@ NNI <- function (tree, edgeToBreak = NULL) { #' @export cNNI <- function (tree, edgeToBreak = NULL, whichSwitch = NULL) { edge <- tree[["edge"]] - if (is.null(edgeToBreak)) edgeToBreak <- sample.int(dim(edge)[1] - NTip(tree) - 1L, 1L) - if (is.null(whichSwitch)) whichSwitch <- sample.int(2L, 1L) + if (is.null(edgeToBreak)) { + edgeToBreak <- sample.int(dim(edge)[[1]] - NTip(tree) - 1L, 1L) + } + if (is.null(whichSwitch)) { + whichSwitch <- sample.int(2L, 1L) + } tree[["edge"]] <- nni(edge, edgeToBreak, whichSwitch) # Return: From 64c76c621ee26da64182c5259b6ae4812da65f65 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:17:59 +0100 Subject: [PATCH 18/30] RNGversion --- tests/testthat/test-Jackknife.R | 2 +- vignettes/profile.Rmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-Jackknife.R b/tests/testthat/test-Jackknife.R index b2058710b..a93d50597 100644 --- a/tests/testthat/test-Jackknife.R +++ b/tests/testthat/test-Jackknife.R @@ -11,7 +11,7 @@ test_that("Jackknife supports are correct", { expect_error(Jackknife(start_tree, dataset, resampleFreq = 0)) expect_error(Jackknife(start_tree, dataset, resampleFreq = 9/10)) - RNGversion("3.6.0") + suppressWarnings(RNGversion("3.5.0")) set.seed(0) strict <- TreeSearch(start_tree, dataset, verbosity = 0) diff --git a/vignettes/profile.Rmd b/vignettes/profile.Rmd index ef2fd1389..3908b4556 100644 --- a/vignettes/profile.Rmd +++ b/vignettes/profile.Rmd @@ -40,7 +40,7 @@ library("TreeSearch") In order to reproduce the random elements of this document, set a random seed: -```{R rng-version} +```{R rng-version, warn = FALSE} # Set a random seed so that random functions in this document are reproducible RNGversion("3.5.0") set.seed(888) From 52603ee63c7ae6b4eb79a35a29cbd1dd336c369c Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:25:41 +0100 Subject: [PATCH 19/30] [] --- R/AdditionTree.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/AdditionTree.R b/R/AdditionTree.R index 29139ec1d..af09b4bd2 100644 --- a/R/AdditionTree.R +++ b/R/AdditionTree.R @@ -31,7 +31,7 @@ AdditionTree <- function (dataset, concavity = Inf, constraint, sequence) { # Initialize missing parameters taxa <- names(dataset) if (missing(sequence)) { - sequence <- taxa[1] + sequence <- taxa[[1]] } else if (is.numeric(sequence)) { sequence <- taxa[sequence] } From dc0d8de23151cc6eeae94bc20a80d8e5ccf1cd72 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:51:13 +0100 Subject: [PATCH 20/30] unset originalIndex attribute --- R/AdditionTree.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/AdditionTree.R b/R/AdditionTree.R index af09b4bd2..bd5b77a01 100644 --- a/R/AdditionTree.R +++ b/R/AdditionTree.R @@ -53,6 +53,7 @@ AdditionTree <- function (dataset, concavity = Inf, constraint, sequence) { attr(dataset, "info.amounts") <- NULL attr(dataset, "min.length") <- NULL attr(dataset, "informative") <- NULL + attr(dataset, "originalIndex") <- NULL # Starting tree, rooted on first element in sequence tree <- PectinateTree(sequence[1:3]) From a35fde7b101017b64455603bacfadc6082b55db0 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Thu, 5 Sep 2024 11:06:00 +0100 Subject: [PATCH 21/30] brio 1.1.3 now available --- .github/workflows/memcheck.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml index 170e09f3e..bf14c95f3 100644 --- a/.github/workflows/memcheck.yml +++ b/.github/workflows/memcheck.yml @@ -83,9 +83,6 @@ jobs: - name: Install dependencies run: | - if ("${{ matrix.config.test }}" == 'tests') { - remotes::install_github('r-lib/brio#20') # brio mem leak - } remotes::install_deps(dependencies = c('soft', 'Config/Needs/memcheck')) shell: Rscript {0} From f72f53c60886f8102c5f7e60070950f2650fb541 Mon Sep 17 00:00:00 2001 From: "Martin R. Smith" <1695515+ms609@users.noreply.github.com> Date: Fri, 11 Oct 2024 12:37:46 +0100 Subject: [PATCH 22/30] Bump version to .9001 --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e4771c456..3d3beb8d2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: TreeSearch Title: Phylogenetic Analysis with Discrete Character Data -Version: 1.5.1.9000 +Version: 1.5.1.9001 Authors@R: c( person( "Martin R.", 'Smith', diff --git a/NEWS.md b/NEWS.md index 92863ea3f..687fc4c82 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# TreeSearch 1.5.1.9000 (2024-08) +# TreeSearch 1.5.1.9001 (2024-10) - Support for ordered (additive) characters - Require R 3.6 (to simplify maintenance) From 9f739a45acfa8765d9ecbca5140f667f70c3334e Mon Sep 17 00:00:00 2001 From: RevBayes analysis <1695515+ms609@users.noreply.github.com> Date: Thu, 31 Oct 2024 09:10:07 +0000 Subject: [PATCH 23/30] Create update-csl.yml --- .github/workflows/update-csl.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/update-csl.yml diff --git a/.github/workflows/update-csl.yml b/.github/workflows/update-csl.yml new file mode 100644 index 000000000..0753d13a6 --- /dev/null +++ b/.github/workflows/update-csl.yml @@ -0,0 +1,31 @@ +name: Update CSL file +on: + schedule: + - cron: '0 0 * * 1' # Runs weekly on Monday at 00:00 UTC + workflow_dispatch: # Allows manual triggering + +jobs: + update-csl: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Download latest CSL file + run: | + curl -o inst/apa-old-doi-prefix.csl https://raw.githubusercontent.com/citation-style-language/styles/master/apa-old-doi-prefix.csl + + - name: Check for changes + id: changes + run: | + if git diff --quiet; then + echo "No changes to commit" + exit 0 + fi + + - name: Commit and push if changed + run: | + git config --local user.email "actions@github.com" + git config --local user.name "GitHub Actions" + git add inst/apa-old-doi-prefix.csl + git commit -m "Update CSL file from upstream" + git push From 4adbc16e15cb1a09ea2a3e1b8c4f2cec11b3a4d3 Mon Sep 17 00:00:00 2001 From: RevBayes analysis <1695515+ms609@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:17:34 +0000 Subject: [PATCH 24/30] Fixed package versions --- .github/workflows/R-CMD-check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index 0cefdaedd..49ecd447e 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -85,6 +85,10 @@ jobs: uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: | + downlit@0.4.3 + pkgdown@2.0.9 + profvis@0.3.8 + gtable@0.3.5 evaluate@0.23 knitr@1.45 phangorn@2.7.1 From efa01418c27bfd35bd86b43bf23b82e328c03c97 Mon Sep 17 00:00:00 2001 From: RevBayes analysis <1695515+ms609@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:38:49 +0000 Subject: [PATCH 25/30] waldo, testthat --- .github/workflows/R-CMD-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index 49ecd447e..a518ad8d4 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -85,6 +85,8 @@ jobs: uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: | + waldo@0.5.3 + testthat@3.2.1 downlit@0.4.3 pkgdown@2.0.9 profvis@0.3.8 From af8c7fb36312a82af287eb9e46d3fbd97aff53c9 Mon Sep 17 00:00:00 2001 From: RevBayes analysis <1695515+ms609@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:53:36 +0000 Subject: [PATCH 26/30] vdiff, cpp, httr versions --- .github/workflows/R-CMD-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index a518ad8d4..ce765887e 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -86,6 +86,9 @@ jobs: with: extra-packages: | waldo@0.5.3 + vdiffr@1.0.7 + cpp11@0.5.0 + httr2@1.0.1 testthat@3.2.1 downlit@0.4.3 pkgdown@2.0.9 From 0b260211283b42c79a77062d33c5cb0e9bc61677 Mon Sep 17 00:00:00 2001 From: RevBayes analysis <1695515+ms609@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:27:20 +0000 Subject: [PATCH 27/30] bench@1.1.3 --- .github/workflows/R-CMD-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index ce765887e..0c7642e62 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -86,6 +86,7 @@ jobs: with: extra-packages: | waldo@0.5.3 + bench@1.1.3 vdiffr@1.0.7 cpp11@0.5.0 httr2@1.0.1 From 0ae1e36894d1ff38088bd0ce3ee0d7ba917ace9e Mon Sep 17 00:00:00 2001 From: RevBayes analysis <1695515+ms609@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:28:48 +0000 Subject: [PATCH 28/30] .9005 --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index fd6e04f6f..c3b6c98be 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: TreeSearch Title: Phylogenetic Analysis with Discrete Character Data -Version: 1.5.1.9004 +Version: 1.5.1.9005 Authors@R: c( person( "Martin R.", 'Smith', diff --git a/NEWS.md b/NEWS.md index 29cdc1404..80ba02969 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# TreeSearch 1.5.1.9004 (2025-02) +# TreeSearch 1.5.1.9005 (2025-02) - Support for ordered (additive) characters - Require R 3.6 (to simplify maintenance) From 63e38d00514a37950e2099e9719139f550d3d819 Mon Sep 17 00:00:00 2001 From: RevBayes analysis <1695515+ms609@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:38:07 +0000 Subject: [PATCH 29/30] Require R4.0 --- .github/workflows/R-CMD-check.yml | 29 ++--------------------------- DESCRIPTION | 2 +- NEWS.md | 2 +- vignettes/tree-space.Rmd | 10 ---------- 4 files changed, 4 insertions(+), 39 deletions(-) diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml index 0c7642e62..389663d00 100644 --- a/.github/workflows/R-CMD-check.yml +++ b/.github/workflows/R-CMD-check.yml @@ -47,7 +47,7 @@ jobs: config: - {os: windows-latest, r: 'release'} - {os: macOS-latest, r: 'release'} - - {os: ubuntu-20.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-20.04, r: '4.1', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} # Until TreeDist can slough phangorn - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} @@ -79,33 +79,8 @@ jobs: if: runner.os == 'macOS' run: | brew install libgit2 xquartz ghostscript - - - name: Set up R dependencies (R 3.6) - if: matrix.config.r == '3.6' - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - waldo@0.5.3 - bench@1.1.3 - vdiffr@1.0.7 - cpp11@0.5.0 - httr2@1.0.1 - testthat@3.2.1 - downlit@0.4.3 - pkgdown@2.0.9 - profvis@0.3.8 - gtable@0.3.5 - evaluate@0.23 - knitr@1.45 - phangorn@2.7.1 - Rfast@1.9.8 - rjson@0.2.20 - XML@3.99-0.3 - needs: | - check - + - name: Set up R dependencies - if: matrix.config.r != '3.6' uses: r-lib/actions/setup-r-dependencies@v2 with: needs: | diff --git a/DESCRIPTION b/DESCRIPTION index c3b6c98be..bf99b9165 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,7 +32,7 @@ Description: Reconstruct phylogenetic trees from discrete data. URL: https://ms609.github.io/TreeSearch/ (doc), https://github.com/ms609/TreeSearch/ (devel) BugReports: https://github.com/ms609/TreeSearch/issues/ -Depends: R (>= 3.6.0) +Depends: R (>= 4.0) Imports: ape (>= 5.6), cli (>= 3.0), diff --git a/NEWS.md b/NEWS.md index 80ba02969..4b8fa9af3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,7 @@ # TreeSearch 1.5.1.9005 (2025-02) - Support for ordered (additive) characters -- Require R 3.6 (to simplify maintenance) +- Require R 4.0 (to simplify maintenance) # TreeSearch 1.5.1.9003 (2025-02) diff --git a/vignettes/tree-space.Rmd b/vignettes/tree-space.Rmd index d0aa882bc..76ad58b86 100644 --- a/vignettes/tree-space.Rmd +++ b/vignettes/tree-space.Rmd @@ -259,16 +259,6 @@ nClusters <- length(unique(clustering)) Now we can map tree space into a few dimensions and visualise the distribution of trees: -```{r palette.colors, echo = FALSE} -if (packageVersion("base") < "4.0.0") { - # TODO delete when require R4.0 - palette.colors <- function(x, ...) { - c("#AA0DFECC", "#3283FECC", "#85660DCC", "#782AB6CC", "#565656CC", -"#1C8356CC", "#16FF32CC", "#F7E1A0CC", "#E2E2E2CC", "#1CBE4FCC", -"#C4451CCC", "#DEA0FDCC")[seq_len(x)] - } -} -``` ```{r map-space, fig.keep = "none"} nDim <- 3 # Number of dimensions to plot From c74e053c0502031b91b09ed5aecd0611af1d5881 Mon Sep 17 00:00:00 2001 From: RevBayes analysis <1695515+ms609@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:55:27 +0000 Subject: [PATCH 30/30] Rm RNGversion("3.5.0") --- tests/testthat/test-CustomSearch.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-CustomSearch.R b/tests/testthat/test-CustomSearch.R index fe2d418da..9b496184b 100644 --- a/tests/testthat/test-CustomSearch.R +++ b/tests/testthat/test-CustomSearch.R @@ -10,7 +10,7 @@ RootySwappers <- list(RootedTBRSwap, RootedSPRSwap, RootedNNISwap) test_that("Tree can be found", { skip_if_not_installed("phangorn") phy11 <- phangorn::phyDat(data11, type = "USER", levels = c(FALSE, TRUE)) - RNGversion("3.5.0") + RNGkind("Mersenne-Twister") set.seed(1) random11 <- as.phylo(17905853L, 11, letters[1:11]) expect_error(TreeSearch(unrooted11, dataset = phy11)) @@ -110,7 +110,7 @@ test_that("Profile parsimony works in tree search", { dataset <- TreeTools::PhyDat(sillyData) readyData <- PrepareDataProfile(dataset) - RNGversion("3.5.0") + RNGkind("Mersenne-Twister") set.seed(0) rTree <- randomTree <- RandomTree(dataset, "1")