From b97654bc87f6c667dc49aeeb1c73529462f81f91 Mon Sep 17 00:00:00 2001 From: Klaus Schliep Date: Sat, 19 Oct 2024 06:39:34 +0200 Subject: [PATCH] test --- R/ancestral.R | 2 +- inst/tinytest/test_ancestral.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ancestral.R b/R/ancestral.R index d90b5dc4..35be08cd 100644 --- a/R/ancestral.R +++ b/R/ancestral.R @@ -211,7 +211,7 @@ anc_pml <- function(object, type = "marginal", ...) { #' align <- read.phyDat("ancestral_align.fasta", format="fasta") #' tree <- read.tree("ancestral_tree.nwk") #' df <- read.table("ancestral.state", header=TRUE) -#' anc_ml_disc <- as.ancestral(tree, align, df) +#' anc_ml_disc <- as.ancestral(tree, df, align) #' plotAnc(anc_ml_disc, 20) #' unlink(c("ancestral_align.fasta", "ancestral_tree.nwk", "ancestral.state")) #' @rdname write.ancestral diff --git a/inst/tinytest/test_ancestral.R b/inst/tinytest/test_ancestral.R index b0bc2fb1..662d0ad8 100644 --- a/inst/tinytest/test_ancestral.R +++ b/inst/tinytest/test_ancestral.R @@ -36,7 +36,7 @@ write.ancestral(anc_ml) align <- read.phyDat("ancestral_align.fasta", format = "fasta") tree <- read.tree("ancestral_tree.nwk") df <- read.table("ancestral.state", header=TRUE) -anc_ml_disc <- as.ancestral(tree, align, df) +anc_ml_disc <- as.ancestral(tree, df, align) expect_equal(anc_ml$tree, anc_ml_disc$tree) expect_equal(anc_ml$data[tree$tip.label], anc_ml_disc$data) #expect_equal(anc_ml[[3]], anc_ml_disc[[3]])