[Picante-commits] r207 - in branches/will: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 20 06:10:24 CET 2009
Author: will_cornwell
Date: 2009-11-20 06:10:24 +0100 (Fri, 20 Nov 2009)
New Revision: 207
Modified:
branches/will/DESCRIPTION
branches/will/R/evol.distinct.R
branches/will/man/evol.distinct.Rd
branches/will/man/get.nodes.Rd
branches/will/man/tax.distinctiveness.Rd
Log:
removing Geiger dependancy
Modified: branches/will/DESCRIPTION
===================================================================
--- branches/will/DESCRIPTION 2009-11-19 01:17:54 UTC (rev 206)
+++ branches/will/DESCRIPTION 2009-11-20 05:10:24 UTC (rev 207)
@@ -3,9 +3,9 @@
Title: R tools for integrating phylogenies and ecology
Version: 0.6-1
Date: 2009-3-18
-Author: Steven Kembel <skembel at uoregon.edu>, David Ackerly <dackerly at berkeley.edu>, Simon Blomberg <s.blomberg1 at uq.edu.au>, Peter Cowan <pdc at berkeley.edu>, Matthew Helmus <mrhelmus at wisc.edu>, Helene Morlon <morlon.helene at gmail.com>, Campbell Webb <cwebb at oeb.harvard.edu>, Will Cornwell <wcornwell at zoology.ubc.ca>
+Author: Steven Kembel <skembel at uoregon.edu>, David Ackerly <dackerly at berkeley.edu>, Simon Blomberg <s.blomberg1 at uq.edu.au>, Peter Cowan <pdc at berkeley.edu>, Matthew Helmus <mrhelmus at wisc.edu>, Helene Morlon <morlon.helene at gmail.com>, Campbell Webb <cwebb at oeb.harvard.edu>, Will Cornwell <cornwell at zoology.ubc.ca>
Maintainer: Steven Kembel <skembel at uoregon.edu>
-Depends: ape, vegan, nlme, geiger
+Depends: ape, vegan, nlme
Suggests: brglm, circular
Description: Phylocom integration, community analyses, null-models, traits and evolution in R
License: GPL-2
Modified: branches/will/R/evol.distinct.R
===================================================================
--- branches/will/R/evol.distinct.R 2009-11-19 01:17:54 UTC (rev 206)
+++ branches/will/R/evol.distinct.R 2009-11-20 05:10:24 UTC (rev 207)
@@ -13,13 +13,14 @@
#Scale tree to have unit depth (for an ultrametric tree) or scale all branches to unit length (for an additive tree)
if(is.ultrametric(tree)==TRUE)
-tree<- rescaleTree(tree, 1) else
+tree$edge.length<- tree$edge.length/(as.numeric(branching.times(tree)[1])) else
tree$edge.length<- tree$edge.length/sum(tree$edge.length)
}
if(use.branch.lengths==FALSE)
-tree<- speciationalTree(tree)
+tree$edge.length<- rep(1, length(tree$edge.length))
+
for(i in 1:length(tree$tip.label)){
spp<- tree$tip.label[i]
nodes<- get.nodes(tree, spp)
@@ -33,7 +34,8 @@
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)){
- n.descendents<- length(node.leaves(tree, nodes[j]))
+ sons<-node.desc(tree, nodes[j])
+ n.descendents<- length(sons$tips)
if(j==1)
portion<- n.descendents else
portion<- c(n.descendents, portion)
Modified: branches/will/man/evol.distinct.Rd
===================================================================
--- branches/will/man/evol.distinct.Rd 2009-11-19 01:17:54 UTC (rev 206)
+++ branches/will/man/evol.distinct.Rd 2009-11-20 05:10:24 UTC (rev 207)
@@ -7,7 +7,7 @@
Species' evolutionary distinctiveness
}
\description{
-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.
+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 datafram with species identifiers and species scores.
}
\usage{
evol.distinct(tree, type = c("equal.splits", "fair.proportion"), scale = FALSE, use.branch.lengths = TRUE)
@@ -15,7 +15,7 @@
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{tree}{
-a .phylo "APE" tree}
+an object of class phylo}
\item{type}{
a) equal splits (Redding and Mooers 2006) or b) fair proportions (Isaac et al., 2007)
}
Modified: branches/will/man/get.nodes.Rd
===================================================================
--- branches/will/man/get.nodes.Rd 2009-11-19 01:17:54 UTC (rev 206)
+++ branches/will/man/get.nodes.Rd 2009-11-20 05:10:24 UTC (rev 207)
@@ -30,28 +30,4 @@
}
-%% ~Make other sections like Warning with \section{Warning }{....} ~
-
-\examples{
-##---- Should be DIRECTLY executable !! ----
-##-- ==> Define data, use random,
-##-- or do help(data=index) for the standard data sets.
-
-## The function is currently defined as
-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)
- }
- nodes
- }
-}
-% Add one or more standard keywords, see file 'KEYWORDS' in the
-% R documentation directory.
-\keyword{ ~kwd1 }
-\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
Modified: branches/will/man/tax.distinctiveness.Rd
===================================================================
--- branches/will/man/tax.distinctiveness.Rd 2009-11-19 01:17:54 UTC (rev 206)
+++ branches/will/man/tax.distinctiveness.Rd 2009-11-20 05:10:24 UTC (rev 207)
@@ -14,7 +14,7 @@
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{tree}{
-phylogeny in ape format
+an object of class phylo
}
\item{type}{
specify "Vane-Wright" or "May"
More information about the Picante-commits
mailing list