[Mattice-commits] r88 - in pkg: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Dec 17 07:03:53 CET 2008
Author: andrew_hipp
Date: 2008-12-17 07:03:53 +0100 (Wed, 17 Dec 2008)
New Revision: 88
Added:
pkg/man/regimeVectors.Rd
Modified:
pkg/R/regimes.R
pkg/TODO
pkg/man/paintBranches.Rd
Log:
filling in the documentation
Modified: pkg/R/regimes.R
===================================================================
--- pkg/R/regimes.R 2008-12-15 15:49:31 UTC (rev 87)
+++ pkg/R/regimes.R 2008-12-17 06:03:53 UTC (rev 88)
@@ -30,11 +30,11 @@
# Paints branches with regimes changing at nodes specified
# arguments
# "tree" = OUCH-style (S4) tree
-# "regimeShiftNodes" = a vector of nodes at which selective regimes shift: root must be included, but tips are meaningless in this context
+# "regimeShiftNodes" = a vector of nodes at which selective regimes shift: root may be included--if not present, will be added--but tips are meaningless in this context
# "regimeTitles" = a vector of titles for the regimes that begin at the root and at the nodes indicated in "regimeShiftNodes",
# in order of description in "regimeShiftNodes", except that the root is listed first in "regimeTitles"
# but not at all in "regimeShiftNodes"... defaults to "node[x]regime
-# Value: a vector of regimes that can be plopped right into an OUCH-style tree data frame
+# Value: a vector of regimes that can be handed to hansen
function(regimeShiftNodes, tree, regimeTitles = NULL) {
## ------------------ begin ouchtree block -----------------
## check to see if tree inherits 'ouchtree'
Modified: pkg/TODO
===================================================================
--- pkg/TODO 2008-12-15 15:49:31 UTC (rev 87)
+++ pkg/TODO 2008-12-17 06:03:53 UTC (rev 88)
@@ -5,5 +5,5 @@
5. make a "simulate" method for a hansenBatch object that simulates the data using model-averaged parameters (including theta)
6. DONE: make paintBranches return a complete regime ready to plug into hansen, and modify calling functions accordingly
7. give plot.ouSim a way to highlight or circle or otherwise set off changeNodes
-8. make it easy to pass colors into plot.ouSim... the regime should pop out easily
+8. DONE: make it easy to pass colors into plot.ouSim... the regime should pop out easily
9. make it possible to pass in a vector of lty or lwd to plot.ouSim so the branches can be different widths or patterns
\ No newline at end of file
Modified: pkg/man/paintBranches.Rd
===================================================================
--- pkg/man/paintBranches.Rd 2008-12-15 15:49:31 UTC (rev 87)
+++ pkg/man/paintBranches.Rd 2008-12-17 06:03:53 UTC (rev 88)
@@ -6,7 +6,7 @@
\code{regimeVectors}.
}
\usage{
- function(tree, regimeShiftNodes, regimeTitles)
+paintBranches(tree, regimeShiftNodes, regimeTitles)
}
\arguments{
\item{tree}{An S4 ouchtree object, generated using
@@ -15,15 +15,25 @@
\code{ouchtree}. Old-style ouch trees (data frames) will not work but can be translated using
\code{ouchtree}.
}
-\item{regimeShiftNodes}{Nodes at which the selective regime changes.}
+\item{regimeShiftNodes}{Either a vector of nodes (by number) at which the selective regime changes,
+ or a list of taxa defining nodes. This allows you to use paintBranches with the same
+ nodes you use to call runBatchHansen. This parameter may include the root but does
+ not need to.}
\item{regimeTitles}{Titles for the regimes.}
}
\details{
\code{regimeTitles} is a vector of titles for the regimes that begin at the root and at the nodes indicated in "regimeShiftNodes",
# in order of description in "regimeShiftNodes", except that the root is listed first in "regimeTitles"
-# but not at all in "regimeShiftNodes"
+# but may not be included at all in "regimeShiftNodes."
}
+\value{
+A regime in which shifts in optimum are coded as occuring at all nodes specified in \code{regimeShiftNodes}.
+The regime is formated to input directly into \code{hansen}
+}
+
\examples{
}
-\keyword{paint}
\ No newline at end of file
+\seealso{
+ \code{\link{regimeVectors}}, \code{\link{isMonophyletic}}, \code{\link{nodeDescendents}}, \code{\link{mrcaOUCH}}
+}
Added: pkg/man/regimeVectors.Rd
===================================================================
--- pkg/man/regimeVectors.Rd (rev 0)
+++ pkg/man/regimeVectors.Rd 2008-12-17 06:03:53 UTC (rev 88)
@@ -0,0 +1,36 @@
+\name{regimeVectors}
+\alias{regimeVectors}
+\title{Paint all possible regimes}
+\description{
+ Creates all regimes possible for the nodes specified on the trees provided, returning for each tree only those regimes
+ that are present on that tree, and
+}
+\usage{
+ regimeVectors(ouchTrees, cladeMembersList, maxNodes = NULL)
+}
+\arguments{
+\item{ouchTrees} {
+ A list of S4 ouchtree objects
+ }
+\item{cladeMembersList} {
+ A list of taxa defining nodes.
+ }
+\item{maxNodes} {
+ The maximum number of nodes at which a regime may change.
+ }
+}
+\details{
+ \code{regimeVectors} is the basic call to get all regime permutations for analysis in batchHansen.
+}
+\value{
+A list with three items:
+\item{regList} A list (by tree) of lists of regimes that can be input directly into \code{hansen}.
+\item{nodeMatrix} A matrix indicating which nodes are presentin each tree.
+\item{regMatrix} A list (by tree) of matrices indicating which nodes are present in each model.
+}
+\examples{
+}
+
+\seealso{
+\code{\link{paintBranches}}
+}
\ No newline at end of file
More information about the Mattice-commits
mailing list