[Picante-commits] r205 - in branches/will: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 19 02:13:16 CET 2009


Author: will_cornwell
Date: 2009-11-19 02:13:16 +0100 (Thu, 19 Nov 2009)
New Revision: 205

Added:
   branches/will/R/node.number.R
   branches/will/man/node.number.Rd
Modified:
   branches/will/man/evol.distinct.Rd
   branches/will/man/tax.distinctiveness.Rd
Log:
added internal function for calculating node numbers

Added: branches/will/R/node.number.R
===================================================================
--- branches/will/R/node.number.R	                        (rev 0)
+++ branches/will/R/node.number.R	2009-11-19 01:13:16 UTC (rev 205)
@@ -0,0 +1,15 @@
+#NODE.NUMBER FUNCTION
+#get the number of internal nodes for each spp
+
+node.number<- function(tree){
+	for(i in 1:length(tree$tip.label)){
+	spp<- tree$tip.label[i]
+	n.node<- length(get.nodes(tree, spp))
+	if(i==1)
+		n.node.all<- n.node else
+		n.node.all<- c(n.node.all, n.node)
+	}
+n.node.all<- cbind(tree$tip.label, as.data.frame(n.node.all))
+names(n.node.all)<- c("Species", "n.Nodes")
+n.node.all<- n.node.all
+}
\ No newline at end of file

Modified: branches/will/man/evol.distinct.Rd
===================================================================
--- branches/will/man/evol.distinct.Rd	2009-11-19 01:04:13 UTC (rev 204)
+++ branches/will/man/evol.distinct.Rd	2009-11-19 01:13:16 UTC (rev 205)
@@ -10,7 +10,7 @@
 Calculates evolutionary distinctiveness measures for a suite of species by: a) equal splits (Redding and Mooers 2006) b) fair proportions (Isaac et al., 2007). Returns a vector of species scores.
 }
 \usage{
-evol.distinct(tree, type = c("equal.splits", "fair.proportion"), scale = F, use.branch.lengths = TRUE)
+evol.distinct(tree, type = c("equal.splits", "fair.proportion"), scale = FALSE, use.branch.lengths = TRUE)
 }
 %- maybe also 'usage' for other objects documented here.
 \arguments{
@@ -34,7 +34,7 @@
 Isaac, N.J.B., Turvey, S.T., Collen, B., Waterman, C. and Baillie, J.E.M. (2007). Mammals on
 the EDGE: conservation priorities based on threat and phylogeny. PLoS ONE, 2, e296.
 
-Mark Vellend, William K. Cornwell, Karen Magnuson-Ford, and Arne ¯. Mooers. Measuring phylogenetic biodiversity
+Mark Vellend, William K. Cornwell, Karen Magnuson-Ford, and Arne Mooers. Measuring phylogenetic biodiversity
 In: Biological diversity: frontiers in measurement and assessment.  Edited by Anne Magurran and Brian McGill. in press
 }
 

Added: branches/will/man/node.number.Rd
===================================================================
--- branches/will/man/node.number.Rd	                        (rev 0)
+++ branches/will/man/node.number.Rd	2009-11-19 01:13:16 UTC (rev 205)
@@ -0,0 +1,29 @@
+\name{node.number}
+\Rdversion{1.1}
+\alias{node.number}
+%- Also NEED an '\alias' for EACH other topic documented here.
+\title{
+get number of internal nodes for each species
+}
+\description{
+get the number of internal nodes for each spp
+}
+\usage{
+node.number(tree)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+  \item{tree}{
+APE phylogeny
+}
+}
+
+
+\author{
+Will Cornwell
+}
+\note{
+function for internal use
+}
+
+

Modified: branches/will/man/tax.distinctiveness.Rd
===================================================================
--- branches/will/man/tax.distinctiveness.Rd	2009-11-19 01:04:13 UTC (rev 204)
+++ branches/will/man/tax.distinctiveness.Rd	2009-11-19 01:13:16 UTC (rev 205)
@@ -28,9 +28,9 @@
 
 May, R.M. (1990). Taxonomy as destiny. Nature, 347, 129-130.
 
-Mark Vellend, William K. Cornwell, Karen Magnuson-Ford, and Arne ¯. Mooers. Measuring phylogenetic biodiversity
+Mark Vellend, William K. Cornwell, Karen Magnuson-Ford, and Arne Mooers. Measuring phylogenetic biodiversity
 In: Biological diversity: frontiers in measurement and assessment.
-Edited by Anne Magurran & Brian McGill. in press
+Edited by Anne Magurran and Brian McGill. in press
 }
 
 \author{



More information about the Picante-commits mailing list