[Phylobase-commits] r459 - branches/fm-branch/inst/doc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 13 20:14:30 CEST 2009


Author: bbolker
Date: 2009-08-13 20:14:30 +0200 (Thu, 13 Aug 2009)
New Revision: 459

Modified:
   branches/fm-branch/inst/doc/phylobase.Rnw
Log:
  partial reversion to deal with phylo4d mismatch changes
 


Modified: branches/fm-branch/inst/doc/phylobase.Rnw
===================================================================
--- branches/fm-branch/inst/doc/phylobase.Rnw	2009-08-13 17:58:35 UTC (rev 458)
+++ branches/fm-branch/inst/doc/phylobase.Rnw	2009-08-13 18:14:30 UTC (rev 459)
@@ -99,13 +99,15 @@
 (g1 <- as(geospiza_raw$tree, "phylo4"))
 @
 
-The nodes appear with labels \verb+<NA>+ because their labels are missing:
+The (internal) nodes appear with labels \verb+<NA>+ because
+they are not defined:
 
 <<nodelabelgeodata>>=
 nodeLabels(g1)
 @
 
-(you can also retrieve the node labels with \code{labels(g1,"internal")}).
+(this means ``a character vector of length 0'';
+you can also retrieve the node labels with \code{labels(g1,"internal")}).
 
 A simple way to assign the node numbers as labels (useful for various checks) is
 
@@ -132,7 +134,8 @@
 nodeId(g1, which='allnode')
 @
 
-Print edge labels (also empty in this case):
+Print edge labels (also empty in this case --- therefore
+all \code{NA}):
 <<edgelabelgeodata>>=
 edgeLabels(g1)
 @
@@ -147,7 +150,7 @@
 rootNode(g1)
 @
 
-Does it have any polytomies?
+Does it contain any polytomies?
 <<polygeodata>>=
 hasPoly(g1)
 @
@@ -179,11 +182,9 @@
 g2 <- phylo4d(g1, geospiza_raw$data)
 @
 
-\textbf{no longer an error: now gives
-  a warning and a tree with missing values etc. FIX ME!}
-
 <<geomergeerr1,echo=FALSE>>=
-phylo4d(g1, geospiza_raw$data)
+g2 <- try(phylo4d(g1, geospiza_raw$data),silent=TRUE)
+cat(as.character(g2))
 @
 
 We have two problems --- the first is that we forgot to lowercase the labels on the data to match the tip labels:
@@ -195,13 +196,11 @@
 
 To deal with the second problem (missing data for \emph{G. olivacea}), we have a few choices. The easiest is to use \code{missing.tip.data="OK"} to allow R to create the new object:
 
-\textbf{FIXME: missing.tip.data="OK" no longer used}
 <<geomerge2,keep.source=TRUE>>=
-##g2 <- phylo4d(g1, gdata,missing.tip.data="OK")
-g2 <- phylo4d(g1, gdata)
+g2 <- phylo4d(g1, gdata, missing.data="warn")
 @
 
-(setting \code{missing.tip.data} to \code{"warn"} would create the new object but print a warning).
+(setting \code{missing.data} to \code{"warn"} would create the new object but print a warning).
 
 Another way to deal with this would be to use \code{prune()} to drop the offending tip from the tree first:
 



More information about the Phylobase-commits mailing list