Skip to content

Commit

Permalink
Increased summary.mulTree coverage and added new release
Browse files Browse the repository at this point in the history
  • Loading branch information
TGuillerme committed May 8, 2018
1 parent c881727 commit 123c4d6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Expand Up @@ -2,8 +2,8 @@ Package: mulTree
Title: Performs MCMCglmm on Multiple Phylogenetic Trees
Author: Thomas Guillerme <guillert@tcd.ie> & Kevin Healy <heaylke@tcd.ie>
Maintainer: Thomas Guillerme <guillert@tcd.ie>
Version: 1.3.3
Date: 2018-03-14
Version: 1.3.4
Date: 2018-05-08
Description: Allows to run a MCMCglmm on multiple phylogenetic trees to take into account phylogenetic uncertainty.
Depends:
R (>= 3.0.0),
Expand Down
12 changes: 12 additions & 0 deletions NEWS.md
@@ -1,3 +1,14 @@
mulTree 1.3.4 (2018-05-08)
=========================

### NEW FEATURES

* Increased test coverage for all functions.

### MINOR IMPROVEMENTS

* Improved optional arguments handling for `mulTree` (following [Eldar Rakhimberdiev](https://github.com/eldarrak)'s contribution)

mulTree 1.3.3 (2018-03-14)
=========================

Expand All @@ -13,6 +24,7 @@ mulTree 1.3.2 (2017/10/19)
=========================

### NEW FEATURES

* Complex formula management in `mulTree` and `as.mulTree`.

### MINOR IMPROVEMENTS
Expand Down
2 changes: 1 addition & 1 deletion R/summary.mulTree_fun.R
Expand Up @@ -27,7 +27,7 @@ smooth.hdr <- function(hdr_out, prob, name) {
}
hdr_out$hdr <- new_hdr
## Print some warning!
message("Warning message:\n", name, " has multiple highest density regions (hdr) for some probabilities.\nOnly the maximum and the minimum hdr were used for each probabilities.", sep="")
warning(name, " has multiple highest density regions (hdr) for some probabilities.\nOnly the maximum and the minimum hdr were used for each probabilities.", sep="")
}
return(hdr_out)
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -48,7 +48,7 @@ Authors
-------
[Thomas Guillerme](http://tguillerme.github.io) and [Kevin Healy](http://healyke.github.io)

##Contributors
## Contributors

[Eldar Rakhimberdiev](https://github.com/eldarrak).

Expand Down
16 changes: 14 additions & 2 deletions tests/testthat/test-summary.mulTree.R
Expand Up @@ -90,11 +90,10 @@ test_that("lapply.hdr works", {
expect_is(smooth_simple, "list")
expect_equal(names(smooth_simple), c("hdr", "mode", "falpha"))

expect_message(smooth_bimod <- smooth.hdr(hdrcde::hdr((c(rnorm(50, 1, 1), rnorm(50, 10, 1))), prob=c(50,95)), prob=c(50,95), "test_hrd"))
expect_warning(smooth_bimod <- smooth.hdr(hdrcde::hdr((c(rnorm(50, 1, 1), rnorm(50, 10, 1))), prob=c(50,95)), prob=c(50,95), "test_hrd"))
expect_is(smooth_bimod, "list")
expect_equal(names(smooth_bimod), c("hdr", "mode", "falpha"))


# Errors
expect_error(
lapply.hdr("X", prob=c(50,95))
Expand Down Expand Up @@ -160,6 +159,19 @@ test_that("example works", {
expect_error(
summary(lifespan.mcmc, use.hdr=FALSE, cent.tend=matrix)
)
expect_error(
summary(lifespan.mcmc, prob = 101)
)
test <- lifespan.mcmc
test$Intercept <- 1
test$mass <- 1
test$volancy <- 1
test$phy.var <- 1
test$res.var <- 1
expect_error(
summary(test)
)

# Default example
test_example <- summary(lifespan.mcmc)
expect_is(
Expand Down

0 comments on commit 123c4d6

Please sign in to comment.