[Phylobase-commits] r542 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Aug 20 22:03:49 CEST 2009
Author: francois
Date: 2009-08-20 22:03:49 +0200 (Thu, 20 Aug 2009)
New Revision: 542
Modified:
pkg/R/methods-phylo4d.R
Log:
forcing tdata<- to only replace data
Modified: pkg/R/methods-phylo4d.R
===================================================================
--- pkg/R/methods-phylo4d.R 2009-08-20 19:56:18 UTC (rev 541)
+++ pkg/R/methods-phylo4d.R 2009-08-20 20:03:49 UTC (rev 542)
@@ -119,6 +119,10 @@
value) {
type <- match.arg(type)
+ ## Removes existing data, just keeps the tree (as a phylo4d)
+ object <- extractTree(object)
+ object <- as(object, "phylo4d")
+
tmpData <- switch(type,
tip = .phylo4Data(object, tip.data=value, ...),
internal = .phylo4Data(object, node.data=value, ...),
More information about the Phylobase-commits
mailing list