From 40b2729e611e8e661382c3af495f5b6e0bc1257c Mon Sep 17 00:00:00 2001 From: brj1 Date: Thu, 1 Dec 2016 14:53:51 -0800 Subject: [PATCH] cleaning whitespace --- R/method-fortify.R | 2 +- R/tree-utilities.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/method-fortify.R b/R/method-fortify.R index d2f248ea..386752c9 100644 --- a/R/method-fortify.R +++ b/R/method-fortify.R @@ -448,7 +448,7 @@ as.phylo.phylo4 <- function(phylo4) { ##' @export ##' @author Yu Guangchuang fortify.phylo <- function(model, data, layout="rectangular", - ladderize=TRUE, right=FALSE, mrsd=NULL, as.Date=FALSE, ...) { + ladderize=TRUE, right=FALSE, mrsd=NULL, as.Date=FALSE, ...) { tree <- reorder.phylo(model, 'postorder') if (ladderize == TRUE) { diff --git a/R/tree-utilities.R b/R/tree-utilities.R index 6e7d51e1..5b159e8a 100644 --- a/R/tree-utilities.R +++ b/R/tree-utilities.R @@ -742,7 +742,7 @@ set_branch_length <- function(tree_object, branch.length) { ## if (is(tree_object, "codeml")) { ## tree_anno <- tree_object@mlc@dNdS ## } else - + if (is(tree_object, "codeml_mlc")) { tree_anno <- tree_object@dNdS } else if (is(tree_object, "beast")) { @@ -757,7 +757,7 @@ set_branch_length <- function(tree_object, branch.length) { cn <- cn[!cn %in% c('node', 'parent')] length <- match.arg(branch.length, cn) - + if (all(is.na(as.numeric(tree_anno[, length])))) { stop("branch.length should be numerical attributes...") }