[Picante-commits] r210 - in pkg: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Feb 8 23:50:57 CET 2010
Author: skembel
Date: 2010-02-08 23:50:57 +0100 (Mon, 08 Feb 2010)
New Revision: 210
Removed:
pkg/man/get.nodes.Rd
pkg/man/node.desc.Rd
pkg/man/node.number.Rd
Modified:
pkg/DESCRIPTION
pkg/R/evol.distinct.R
pkg/R/get.nodes.R
pkg/R/node.desc.R
pkg/R/node.number.R
pkg/R/tax.distinctiveness.R
pkg/man/evol.distinct.Rd
pkg/man/picante-package.Rd
pkg/man/tax.distinctiveness.Rd
Log:
Cleaning up documentation for new functions, hiding utility functions
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/DESCRIPTION 2010-02-08 22:50:57 UTC (rev 210)
@@ -3,7 +3,7 @@
Title: R tools for integrating phylogenies and ecology
Version: 0.8-0
Date: 2010-2-8
-Author: Steven W. Kembel <skembel at uoregon.edu>, David D. Ackerly <dackerly at berkeley.edu>, Simon P. Blomberg <s.blomberg1 at uq.edu.au>, Peter D. Cowan <pdc at berkeley.edu>, Matthew R. Helmus <mrhelmus at wisc.edu>, Helene Morlon <morlon.helene at gmail.com>, Campbell O. Webb <cwebb at oeb.harvard.edu>
+Author: Steven W. Kembel <skembel at uoregon.edu>, David D. Ackerly <dackerly at berkeley.edu>, Simon P. Blomberg <s.blomberg1 at uq.edu.au>, Will K. Cornwell <cornwell at zoology.ubc.ca>, Peter D. Cowan <pdc at berkeley.edu>, Matthew R. Helmus <mrhelmus at wisc.edu>, Helene Morlon <morlon.helene at gmail.com>, Campbell O. Webb <cwebb at oeb.harvard.edu>
Maintainer: Steven W. Kembel <skembel at uoregon.edu>
Depends: ape, vegan, nlme
Suggests: brglm, circular, quantreg
Modified: pkg/R/evol.distinct.R
===================================================================
--- pkg/R/evol.distinct.R 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/R/evol.distinct.R 2010-02-08 22:50:57 UTC (rev 210)
@@ -23,7 +23,7 @@
for(i in 1:length(tree$tip.label)){
spp<- tree$tip.label[i]
- nodes<- get.nodes(tree, spp)
+ nodes<- .get.nodes(tree, spp)
#get rid of root node
nodes<- nodes[1:(length(nodes)-1)]
@@ -34,7 +34,7 @@
internal.brlen<- internal.brlen*switch(type,
"equal.splits"= sort(rep(.5,length(internal.brlen))^c(1:length(internal.brlen))),
"fair.proportion"= 1/for(j in 1:length(nodes)){
- sons<-node.desc(tree, nodes[j])
+ sons<-.node.desc(tree, nodes[j])
n.descendents<- length(sons$tips)
if(j==1)
portion<- n.descendents else
Modified: pkg/R/get.nodes.R
===================================================================
--- pkg/R/get.nodes.R 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/R/get.nodes.R 2010-02-08 22:50:57 UTC (rev 210)
@@ -1,15 +1,13 @@
#GET.NODES FUNCTION
#Get a vector of the nodes that are along the path from the root to spp x. This may then be used to determine the number of nodes between the root and the tip (see node.number function) or the length of this path.
-
-
-get.nodes<- function(tree, spp){
+.get.nodes<- function(tree, spp){
edge<- which.edge(tree, spp)
nodes<- tree$edge[edge,1]
root.edge<- which(tree$edge[,1]==(length(tree$tip.label)+1))
-while(!(edge %in% root.edge)){
- edge<- which.edge(tree, tree$edge[edge,1])
- next.node<- tree$edge[edge,1]
- nodes<- c(nodes, next.node)
+ while(!(edge %in% root.edge)){
+ edge<- which.edge(tree, tree$edge[edge,1])
+ next.node<- tree$edge[edge,1]
+ nodes<- c(nodes, next.node)
}
nodes
- }
\ No newline at end of file
+}
\ No newline at end of file
Modified: pkg/R/node.desc.R
===================================================================
--- pkg/R/node.desc.R 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/R/node.desc.R 2010-02-08 22:50:57 UTC (rev 210)
@@ -1,7 +1,7 @@
#modified from a function by Walton Green, Gene Hunt, Scott Wing
#found at http://bricol.net/research/extinctmodel/Rfunctions/lop.R
-node.desc<- function(tr, node)
+.node.desc<- function(tr, node)
# returns vector of decendents for a particular node
{
ee<- tr$edge
Modified: pkg/R/node.number.R
===================================================================
--- pkg/R/node.number.R 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/R/node.number.R 2010-02-08 22:50:57 UTC (rev 210)
@@ -1,10 +1,10 @@
#NODE.NUMBER FUNCTION
#get the number of internal nodes for each spp
-node.number<- function(tree){
+.node.number<- function(tree){
for(i in 1:length(tree$tip.label)){
spp<- tree$tip.label[i]
- n.node<- length(get.nodes(tree, spp))
+ 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)
Modified: pkg/R/tax.distinctiveness.R
===================================================================
--- pkg/R/tax.distinctiveness.R 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/R/tax.distinctiveness.R 2010-02-08 22:50:57 UTC (rev 210)
@@ -5,12 +5,12 @@
if(is.rooted(tree)==FALSE)
warning("A rooted phylogeny is required for meaningful output of this function", call.=FALSE)
-n.nodes<- switch(type, "Vane-Wright"=node.number(tree),
+n.nodes<- switch(type, "Vane-Wright"=.node.number(tree),
"May"={edge<- tree$edge
for(i in 1:length(tree$tip.label)){
spp<- tree$tip.label[i]
- nodes<- get.nodes(tree, spp)
+ nodes<- .get.nodes(tree, spp)
n.branch<- nrow(edge[edge[,1] %in% nodes,])
if(i==1)
n.branch.all<- n.branch else
Modified: pkg/man/evol.distinct.Rd
===================================================================
--- pkg/man/evol.distinct.Rd 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/man/evol.distinct.Rd 2010-02-08 22:50:57 UTC (rev 210)
@@ -28,27 +28,20 @@
}
\references{
-Redding, D.W. and Mooers, A.O. (2006). Incorporating evolutionary measures into conservation
-prioritisation. Conservation Biology, 20, 1670-1678.
+Redding, D.W. and Mooers, A.O. (2006). Incorporating evolutionary measures into conservation prioritisation. Conservation Biology, 20, 1670-1678.
-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.
+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
-In: Biological diversity: frontiers in measurement and assessment. Edited by Anne Magurran and Brian McGill. in press
+Mark Vellend, William K. Cornwell, Karen Magnuson-Ford, and Arne Mooers. In press. Measuring phylogenetic biodiversity. In: Biological diversity: frontiers in measurement and assessment. Edited by Anne Magurran and Brian McGill.
}
\author{
-Karen Magnuson-Ford
-Will Cornwell
-Arne Mooers
-Mark Vellend
+Karen Magnuson-Ford, Will Cornwell, Arne Mooers, Mark Vellend
}
\note{
This function will return a vector of evolutionary distinctivenss for every species in the given tree.
-If only a subset of values are needed there are two, concetually distinct options: either prune the tree first and then pass the tree in or subset the resulting vector. These two options
-will provide very different outputs.
+If only a subset of values are needed there are two, concetually distinct options: either prune the tree first and then pass the tree in or subset the resulting vector. These two options will provide very different outputs.
}
Deleted: pkg/man/get.nodes.Rd
===================================================================
--- pkg/man/get.nodes.Rd 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/man/get.nodes.Rd 2010-02-08 22:50:57 UTC (rev 210)
@@ -1,33 +0,0 @@
-\name{get.nodes}
-\Rdversion{1.1}
-\alias{get.nodes}
-%- Also NEED an '\alias' for EACH other topic documented here.
-\title{
-gets nodes along the evolutionary path to a given species
-}
-\description{
-Get a vector of the nodes that are along the path from the root to spp x. Used in other functions.
-}
-\usage{
-get.nodes(tree, spp)
-}
-%- maybe also 'usage' for other objects documented here.
-\arguments{
- \item{tree}{
-APP tree
-}
- \item{spp}{
-specific species; same format as which.edge in the APE library
-}
-}
-
-
-\author{
-Karen Magnuson-Ford
-Will Cornwell
-Arne Mooers
-Mark Vellend
-}
-
-
-
Deleted: pkg/man/node.desc.Rd
===================================================================
--- pkg/man/node.desc.Rd 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/man/node.desc.Rd 2010-02-08 22:50:57 UTC (rev 210)
@@ -1,30 +0,0 @@
-\name{node.desc}
-\Rdversion{1.1}
-\alias{node.desc}
-\title{
-Descendants of a particular node
-}
-\description{
-Finds the descendants from a particular node
-}
-\usage{
-node.desc(tr, node)
-}
-%- maybe also 'usage' for other objects documented here.
-\arguments{
- \item{tr}{
-an object of class phylo
-}
- \item{node}{
-node number
-}
-}
-
-
-\note{
-utility function. modified from node.sons from Walton Green, Gene Hunt, Scott Wing
-This function could easily be hidden for simplicity's sake.
-
-}
-
-
Deleted: pkg/man/node.number.Rd
===================================================================
--- pkg/man/node.number.Rd 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/man/node.number.Rd 2010-02-08 22:50:57 UTC (rev 210)
@@ -1,29 +0,0 @@
-\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: pkg/man/picante-package.Rd
===================================================================
--- pkg/man/picante-package.Rd 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/man/picante-package.Rd 2010-02-08 22:50:57 UTC (rev 210)
@@ -18,7 +18,7 @@
}
}
\author{
-Author: Steven W. Kembel <skembel at uoregon.edu>, David D. Ackerly <dackerly at berkeley.edu>, Simon P. Blomberg <s.blomberg1 at uq.edu.au>, Peter D. Cowan <pdc at berkeley.edu>, Matthew R. Helmus <mrhelmus at wisc.edu>, Helene Morlon <morlon.helene at gmail.com>, Campbell O. Webb <cwebb at oeb.harvard.edu>
+Author: Steven W. Kembel <skembel at uoregon.edu>, David D. Ackerly <dackerly at berkeley.edu>, Simon P. Blomberg <s.blomberg1 at uq.edu.au>, Will K. Cornwell <cornwell at zoology.ubc.ca>, Peter D. Cowan <pdc at berkeley.edu>, Matthew R. Helmus <mrhelmus at wisc.edu>, Helene Morlon <morlon.helene at gmail.com>, Campbell O. Webb <cwebb at oeb.harvard.edu>
Maintainer: Steven W. Kembel <skembel at uoregon.edu>
}
\keyword{package}
Modified: pkg/man/tax.distinctiveness.Rd
===================================================================
--- pkg/man/tax.distinctiveness.Rd 2010-02-08 22:26:07 UTC (rev 209)
+++ pkg/man/tax.distinctiveness.Rd 2010-02-08 22:50:57 UTC (rev 210)
@@ -23,20 +23,14 @@
\references{
-Vane-Wright, R.I., Humphries, C.J. and Williams, P.H. (1991). What to protect? - Systematics
-and the agony of choice. Biological Conservation, 55, 235-254.
+Vane-Wright, R.I., Humphries, C.J. and Williams, P.H. (1991). What to protect? - Systematics and the agony of choice. Biological Conservation, 55, 235-254.
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
-In: Biological diversity: frontiers in measurement and assessment.
-Edited by Anne Magurran and Brian McGill. in press
+Mark Vellend, William K. Cornwell, Karen Magnuson-Ford, and Arne Mooers. In press. Measuring phylogenetic biodiversity In: Biological diversity: frontiers in measurement and assessment. Edited by Anne Magurran and Brian McGill.
}
\author{
-Karen Magnuson-Ford
-Will Cornwell
-Arne Mooers
-Mark Vellend
+Karen Magnuson-Ford, Will Cornwell, Arne Mooers, Mark Vellend
}
More information about the Picante-commits
mailing list