Permalink
Browse files

fix to attribute of tipRotate value returned by exhaustive method

  • Loading branch information...
1 parent 373624d commit 117c1eb7d08d04463457dff12f278c3fd05d3398 @liamrevell committed Jan 10, 2017
Showing with 7 additions and 7 deletions.
  1. +4 −4 DESCRIPTION
  2. +3 −3 R/cophylo.R
View
@@ -1,6 +1,6 @@
Package: phytools
-Version: 0.5-68
-Date: 2016-12-29
+Version: 0.5-69
+Date: 2016-01-10
Title: Phylogenetic Tools for Comparative Biology (and Other Things)
Author: Liam J. Revell
Maintainer: Liam J. Revell <liam.revell@umb.edu>
@@ -56,6 +56,6 @@ Description: Package contains various functions for phylogenetic analysis.
research.
License: GPL (>= 2)
URL: http://github.com/liamrevell/phytools
-Packaged: 2016-12-29 12:00:00 EST
+Packaged: 2016-01-10 12:00:00 EST
Repository:
-Date/Publication: 2016-12-29 12:00:00 EST
+Date/Publication: 2016-01-10 12:00:00 EST
View
@@ -1,5 +1,5 @@
## creates an object of class "cophylo"
-## written by Liam J. Revell 2015, 2016
+## written by Liam J. Revell 2015, 2016, 2017
cophylo<-function(tr1,tr2,assoc=NULL,rotate=TRUE,...){
if(!inherits(tr1,"phylo")||!inherits(tr2,"phylo"))
stop("tr1 & tr2 should be objects of class \"phylo\".")
@@ -51,9 +51,9 @@ cophylo<-function(tr1,tr2,assoc=NULL,rotate=TRUE,...){
obj<-list()
for(i in 1:nrow(ij)){
tr1<-tt1[[ij[i,1]]]
- attr(tr1,"minRotate")<-M1[ij[i,]]
+ attr(tr1,"minRotate")<-M1[ij[i,1],ij[i,2]]
tr2<-tt2[[ij[i,2]]]
- attr(tr2,"minRotate")<-M2[ij[i,]]
+ attr(tr2,"minRotate")<-M2[ij[i,1],ij[i,2]]
tt<-list(tr1,tr2)
class(tt)<-"multiPhylo"
obj[[i]]<-list(trees=tt,assoc=assoc)

0 comments on commit 117c1eb

Please sign in to comment.