[Mattice-commits] r184 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Feb 26 20:01:22 CET 2009
Author: andrew_hipp
Date: 2009-02-26 20:01:22 +0100 (Thu, 26 Feb 2009)
New Revision: 184
Modified:
pkg/R/regimes.R
Log:
cleaning up regimes.R
Modified: pkg/R/regimes.R
===================================================================
--- pkg/R/regimes.R 2009-02-25 21:19:08 UTC (rev 183)
+++ pkg/R/regimes.R 2009-02-26 19:01:22 UTC (rev 184)
@@ -30,11 +30,16 @@
# 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 may be included--if not present, will be added--but tips are meaningless in this context
+# "regimeShiftNodes" = a vector of nodes or a list of taxa defining 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 handed to hansen
+# this is an especially ugly function, and I'm sure there are prettier ways of doing it. The 'paint' function in
+# ouch could be adapted to this purpose, if one makes a series of consecutive calls going down the tree,
+# and down the road it would probably make sense to turn this into just such a function.
+
function(regimeShiftNodes, tree, regimeTitles = NULL) {
## ------------------ begin ouchtree block -----------------
## check to see if tree inherits 'ouchtree'
More information about the Mattice-commits
mailing list