[Mattice-commits] r110 - in pkg: R man misc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 29 05:24:14 CET 2008


Author: andrew_hipp
Date: 2008-12-29 05:24:13 +0100 (Mon, 29 Dec 2008)
New Revision: 110

Added:
   pkg/misc/carex.Rd
Removed:
   pkg/man/carex.Rd
Modified:
   pkg/R/informationCriterion.R
   pkg/man/ouSim.Rd
   pkg/man/paintBranches.Rd
   pkg/man/plot.ouSim.Rd
   pkg/man/runBatchHansen.Rd
   pkg/man/summary.hansenBatch.Rd
Log:
fixing up documentation problems; moving carex.Rd to misc/ in case that is causing a build problem

Modified: pkg/R/informationCriterion.R
===================================================================
--- pkg/R/informationCriterion.R	2008-12-23 21:57:07 UTC (rev 109)
+++ pkg/R/informationCriterion.R	2008-12-29 04:24:13 UTC (rev 110)
@@ -1,7 +1,6 @@
 informationCriterion <- function(u = NULL, lnL = NULL, K, n = 1, names = NULL) {
 ## Returns information criterion values + weights for a vector of u or lnL, a vector of K (= df), and a single n (sample size); names for analyses are optional
-  if(n = 1) warning("Information criterion values calculated assuming sample size = 1; 
-                     if this is accurate, consider additional sampling for future projects.")
+  if(n == 1) warning("Information criterion values calculated assuming sample size = 1; if this is accurate, consider additional sampling for future projects.")
   if(identical(u,NULL)) u <- -2 * lnL # deviance (u) needed; take from lnL if not provided, ignore lnL if provided
   if(identical(names, NULL)) names <- seq(length(u))
   AIC <- vector("numeric", length(u))

Deleted: pkg/man/carex.Rd
===================================================================
--- pkg/man/carex.Rd	2008-12-23 21:57:07 UTC (rev 109)
+++ pkg/man/carex.Rd	2008-12-29 04:24:13 UTC (rev 110)
@@ -1,56 +0,0 @@
-\name{carex}
-\alias{carex}
-\docType{data}
-\title{Carex section Ovales tree, chromosome data, and nodes}
-\description{
-  This is the Carex dataset used in Hipp (2007). It is a list with three items: a tree of 53 taxa for which chromosome
-  counts are known; a vector of log-transformed mean chromosome counts for all taxa; and a list of eight taxon vectors.
-}
-\usage{data(carex)}
-\format{
-  A list with three items:
-  \describe{
-    \item{tree} An ultrametric tree in \code{phylo} format with 53 tips 
-    \item{dat} A named numeric vector of log-transformed mean chromosome counts for all 53 taxa
-    \item{nodes} A list of eight taxon vectors defining the eight nodes studied.
-  }
-}
-\details{
-  \item{phylogeny}{
-  Phylogeny (\code{tree}) was estimated for approximately 80 species (Hipp 2006), branch lengths optimized using penalized likelihood
-  in \pkg{ape}, and then the tree was pruned down to only those taxa for which chromosome counts were available.
-  }
-  \item{chromosome counts}{
-  Chromosome counts (\code{dat}) were averaged by population, and the means log-transformed for analysis.
-  }
-  \item{nodes}{
-  Eight nodes were selected for analysis based on clade support and number of taxa in the clade.
-  }
-}
-\source{
-  Hipp, A.L. (2007) 
-  Non-uniform processes of chromosome evolution in sedges (Carex: Cyperaceae). 
-  Evolution 61:2175-2194.
-}
-\references{
-  Hipp, A.L., P.E. Rothrock, A.A. Reznicek, and J.A. Weber (2006) 
-  Phylogeny and classification of Carex section Ovales (Cyperaceae). 
-  International Journal of Plant Sciences 167:1029-1048.
-  
-  Hipp, A.L. (2007) 
-  Non-uniform processes of chromosome evolution in sedges (Carex: Cyperaceae). 
-  Evolution 61:2175-2194.
-}
-
-\examples{
-  data(carex)
-  carex$tree <- ape2ouch(carex$tree) # tree comes in in \code{phylo} format, but we need an ouchtree object
-  attach(carex)
-  trial <- runBatchHansen(tree, dat, nodes, maxNodes = 3) # for expedience, only allows regime changes at up to 3 nodes
-  summary(trial) # summarizes results using summary.hansenBatch and displays the results using print.hansenSummary
-  trialSim <- ouSim(trial, tree) # simulates the evolution of the chromosome number under the model-averaged values
-  plot(trialSim) # plots the character simulation, with all branches black
-  plot(trialSim, colors = paintBranches(nodes, tree)) # plots the character simulation, with branch colors changing at all 8 nodes
-  plot(trialSim, colors = paintBranches(list(nodes[[2]]), tree)) # plots the character simulation, with branch colors changing only at node 2
-}
-\author{Andrew L. Hipp <ahipp at mortonarb.org>}

Modified: pkg/man/ouSim.Rd
===================================================================
--- pkg/man/ouSim.Rd	2008-12-23 21:57:07 UTC (rev 109)
+++ pkg/man/ouSim.Rd	2008-12-29 04:24:13 UTC (rev 110)
@@ -102,7 +102,7 @@
   }
 \author{Andrew Hipp ahipp at mortonarb.org}
 \seealso{
-   \code{\link{plot.ouSim}} for visualizing simulation; \code{\link{carex}} for examples
+   \code{\link{plot.ouSim}} for visualizing simulation; \code{carex} for examples
 }
 \references{
   Hansen, T.F. (1997)

Modified: pkg/man/paintBranches.Rd
===================================================================
--- pkg/man/paintBranches.Rd	2008-12-23 21:57:07 UTC (rev 109)
+++ pkg/man/paintBranches.Rd	2008-12-29 04:24:13 UTC (rev 110)
@@ -6,19 +6,19 @@
   \code{regimeVectors}.
 }
 \usage{
-  paintBranches(tree, regimeShiftNodes, regimeTitles)
+  paintBranches(regimeShiftNodes, tree, regimeTitles)
 }
 \arguments{
-  \item{tree}{
-   An S4 \code{ouchtree} object, generated using \code{ape2ouch} or \code{ouchtree}. 
-   Old-style ouch trees (data frames) will not work but can be translated using \code{ouchtree}.
-   }
   \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{tree}{
+   An S4 \code{ouchtree} object, generated using \code{ape2ouch} or \code{ouchtree}. 
+   Old-style ouch trees (data frames) will not work but can be translated using \code{ouchtree}.
+   }
   \item{regimeTitles}{
    Titles for the regimes.
    } 

Modified: pkg/man/plot.ouSim.Rd
===================================================================
--- pkg/man/plot.ouSim.Rd	2008-12-23 21:57:07 UTC (rev 109)
+++ pkg/man/plot.ouSim.Rd	2008-12-29 04:24:13 UTC (rev 110)
@@ -30,5 +30,5 @@
 }
 \author{Andrew Hipp ahipp at mortonarb.org}
 \seealso{
-   \code{\link{ouSim}} for simulations; \code{\link{carex}} for examples
+   \code{\link{ouSim}} for simulations; \code{carex} for examples
 }

Modified: pkg/man/runBatchHansen.Rd
===================================================================
--- pkg/man/runBatchHansen.Rd	2008-12-23 21:57:07 UTC (rev 109)
+++ pkg/man/runBatchHansen.Rd	2008-12-29 04:24:13 UTC (rev 110)
@@ -92,5 +92,5 @@
 }
 \author{Andrew Hipp <ahipp at mortonarb.org>}
 \seealso{
-   \code{\link{summary.hansenBatch}} for summarizing data; \code{\link{carex}} for an example
+   \code{\link{summary.hansenBatch}} for summarizing data; \code{carex} for an example
 }

Modified: pkg/man/summary.hansenBatch.Rd
===================================================================
--- pkg/man/summary.hansenBatch.Rd	2008-12-23 21:57:07 UTC (rev 109)
+++ pkg/man/summary.hansenBatch.Rd	2008-12-29 04:24:13 UTC (rev 110)
@@ -52,5 +52,5 @@
   }
 \author{Andrew Hipp <ahipp at mortonarb.org>}
 \seealso{
-   \code{\link{carex}} for an example
+   \code{carex} for an example
 }

Added: pkg/misc/carex.Rd
===================================================================
--- pkg/misc/carex.Rd	                        (rev 0)
+++ pkg/misc/carex.Rd	2008-12-29 04:24:13 UTC (rev 110)
@@ -0,0 +1,62 @@
+\name{carex}
+\alias{carex}
+\docType{data}
+\title{Carex section Ovales tree, chromosome data, and nodes}
+\description{
+  This is the Carex dataset used in Hipp (2007). It is a list with three items: a tree of 53 taxa for which chromosome
+  counts are known; a vector of log-transformed mean chromosome counts for all taxa; and a list of eight taxon vectors.
+}
+\usage{data(carex)}
+\format{
+  A list with three items:
+  \describe{
+    \item{tree}{
+     An ultrametric tree in \code{phylo} format with 53 tips
+     }
+    \item{dat}{
+     A named numeric vector of log-transformed mean chromosome counts for all 53 taxa
+     }
+    \item{nodes}{
+     A list of eight taxon vectors defining the eight nodes studied.
+     }
+  }
+}
+\details{
+  \item{phylogeny}{
+  Phylogeny (\code{tree}) was estimated for approximately 80 species (Hipp 2006), branch lengths optimized using penalized likelihood
+  in \pkg{ape}, and then the tree was pruned down to only those taxa for which chromosome counts were available.
+  }
+  \item{chromosome counts}{
+  Chromosome counts (\code{dat}) were averaged by population, and the means log-transformed for analysis.
+  }
+  \item{nodes}{
+  Eight nodes were selected for analysis based on clade support and number of taxa in the clade.
+  }
+}
+\source{
+  Hipp, A.L. (2007) 
+  Non-uniform processes of chromosome evolution in sedges (Carex: Cyperaceae). 
+  Evolution 61:2175-2194.
+}
+\references{
+  Hipp, A.L., P.E. Rothrock, A.A. Reznicek, and J.A. Weber (2006) 
+  Phylogeny and classification of Carex section Ovales (Cyperaceae). 
+  International Journal of Plant Sciences 167:1029-1048.
+  
+  Hipp, A.L. (2007) 
+  Non-uniform processes of chromosome evolution in sedges (Carex: Cyperaceae). 
+  Evolution 61:2175-2194.
+}
+
+\examples{
+  data(carex)
+  carex$tree <- ape2ouch(carex$tree) # tree comes in in \code{phylo} format, but we need an ouchtree object
+  attach(carex)
+  trial <- runBatchHansen(tree, dat, nodes, maxNodes = 3) # for expedience, only allows regime changes at up to 3 nodes
+  summary(trial) # summarizes results using summary.hansenBatch and displays the results using print.hansenSummary
+  trialSim <- ouSim(trial, tree) # simulates the evolution of the chromosome number under the model-averaged values
+  plot(trialSim) # plots the character simulation, with all branches black
+  plot(trialSim, colors = paintBranches(nodes, tree)) # plots the character simulation, with branch colors changing at all 8 nodes
+  plot(trialSim, colors = paintBranches(list(nodes[[2]]), tree)) # plots the character simulation, with branch colors changing only at node 2
+}
+\author{Andrew L. Hipp <ahipp at mortonarb.org>}



More information about the Mattice-commits mailing list