[Phylobase-commits] r365 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Dec 20 04:39:18 CET 2008


Author: bbolker
Date: 2008-12-20 04:39:11 +0100 (Sat, 20 Dec 2008)
New Revision: 365

Modified:
   pkg/R/class-phylo4d.R
   pkg/man/nNodes-methods.Rd
   pkg/man/reorder-methods.Rd
   pkg/man/treewalk.Rd
Log:
  many small tweaks to bring into line with new structures



Modified: pkg/R/class-phylo4d.R
===================================================================
--- pkg/R/class-phylo4d.R	2008-12-20 03:33:14 UTC (rev 364)
+++ pkg/R/class-phylo4d.R	2008-12-20 03:39:11 UTC (rev 365)
@@ -131,6 +131,6 @@
 
 ### first arg is a phylo4d
 setMethod("phylo4d", c("phylo4d"), function(x, ...) {
-          stop("Your object is already a phylo4d object. If you want to modify the data attached to it look help for tdata()<-")
+          stop("Your object is already a phylo4d object. If you want to modify the data attached to it look at the help for tdata()<-")
       })
 

Modified: pkg/man/nNodes-methods.Rd
===================================================================
--- pkg/man/nNodes-methods.Rd	2008-12-20 03:33:14 UTC (rev 364)
+++ pkg/man/nNodes-methods.Rd	2008-12-20 03:39:11 UTC (rev 365)
@@ -97,9 +97,11 @@
   \item{tdata}{\code{signature(object = "phylo4d")}: trait data}
 }
 }
-\section{usage}{
+\usage{
   \S4method{tdata}{phylo4d}(x, which = "tip", \dots)
-  \S4method{tdata<-}{phylo4d}(object, which = "tip", \dots, value)
+% what a pain: see
+% https://stat.ethz.ch/pipermail/r-devel/2008-May/049653.html
+ \S4method{tdata}{phylo4d}(object, which = "tip", \dots) <- value
   \S4method{edgeLength}{phylo4}(x, which)
 }
 \arguments{
@@ -110,6 +112,7 @@
   \item{x}{a phylo4d object}
   \item{object}{a phylo4d object}
   \item{value}{a data frame}
+  \item{\dots}{for future development compatibility}
 }
 \examples{
 data(geospiza)

Modified: pkg/man/reorder-methods.Rd
===================================================================
--- pkg/man/reorder-methods.Rd	2008-12-20 03:33:14 UTC (rev 364)
+++ pkg/man/reorder-methods.Rd	2008-12-20 03:39:11 UTC (rev 365)
@@ -4,7 +4,8 @@
 \alias{reorder,phylo-method}
 \alias{reorder,phylo4-method}
 \alias{reorder,phylo4d-method}
-\title{ ~~ Methods for Function reorder in Package `stats' ~~}
+\alias{orderIndex}
+\title{reordering trees within phylobase objects}
 \description{
  ~~ Methods for function \code{reorder} in Package `stats' ~~
 }
@@ -17,6 +18,7 @@
 }
 
 \usage{
+orderIndex(phy, order = 'cladewise')
 \S4method{reorder}{phylo}(x, ...)
 \S4method{reorder}{phylo4}(x, ...)
 \S4method{reorder}{phylo4d}(x, ...)
@@ -24,6 +26,8 @@
 
 %- maybe also 'usage' for other objects documented here.
 \arguments{
+  \item{phy}{a \code{phylo4} or \code{phylo4d} object}
+  \item{order}{(character)}
   \item{x}{ ~~Describe \code{x} here~~ }
   \item{\dots}{ ~~Describe \code{\dots} here~~ }
 }

Modified: pkg/man/treewalk.Rd
===================================================================
--- pkg/man/treewalk.Rd	2008-12-20 03:33:14 UTC (rev 364)
+++ pkg/man/treewalk.Rd	2008-12-20 03:39:11 UTC (rev 365)
@@ -75,26 +75,28 @@
   a list of all subtrees}
 \examples{
   data(geospiza)
+  nodeLabels(geospiza) <- LETTERS[1:nNodes(geospiza)]
+  plot(as(geospiza,"phylo4"), show.node.label=TRUE)
   getnodes(geospiza,18)
-  getnodes(geospiza,"N04")
-  plot(as(geospiza,"phylo4"), show.node.label=TRUE)
-  ancestor(geospiza,"N11")
-  children(geospiza,"N05")
-  descendants(geospiza,"N11",which="tips")
-  descendants(geospiza,"N11",which="all")
-  ancestors(geospiza,"N11")
+  getnodes(geospiza,"D")
+  ancestor(geospiza,"E")
+  children(geospiza,"C")
+  descendants(geospiza,"D",which="tips")
+  descendants(geospiza,"D",which="all")
+  ancestors(geospiza,"D")
   MRCA(geospiza,"conirostris","difficilis","fuliginosa")
   MRCA(geospiza,"olivacea","conirostris")
 
   ## shortest path between 2 nodes
   shortestPath(geospiza, "fortis","fuliginosa")
-  shortestPath(geospiza, "N02","N05")
+  shortestPath(geospiza, "F","L")
 
   ## identifying an edge fron its terminal node
-  getedges(geospiza,c("olivacea","N02","fortis"))
-  getnodes(geospiza, c("olivacea","N02","fortis"))
+  getedges(geospiza,c("olivacea","B","fortis"))
+  getnodes(geospiza, c("olivacea","B","fortis"))
   geospiza$edge[c(26,1,11),]
-  if(require(ape)){ edgelabels() }
+  ## FIXME
+  ## if(require(ape)){ edgelabels() }
 
   ## branch length from a tip to the root
   sumEdgeLength(geospiza, ancestors(geospiza, "fortis", which="ALL"))



More information about the Phylobase-commits mailing list