[Mattice-commits] r153 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 14 06:02:11 CET 2009


Author: andrew_hipp
Date: 2009-01-14 06:02:11 +0100 (Wed, 14 Jan 2009)
New Revision: 153

Modified:
   pkg/R/informationCriterion.R
   pkg/R/ouSim.ouchtree.R
   pkg/R/ouSim.phylo.R
   pkg/man/informationCriterion.Rd
   pkg/man/ouSim.Rd
Log:
trying to fix all remaining R check errors and warnings

Modified: pkg/R/informationCriterion.R
===================================================================
--- pkg/R/informationCriterion.R	2009-01-14 04:46:34 UTC (rev 152)
+++ pkg/R/informationCriterion.R	2009-01-14 05:02:11 UTC (rev 153)
@@ -37,6 +37,6 @@
   items <- c('u', 'K', 'AIC', 'AICc', 'BIC', 'AICwi', 'AICcwi', 'BICwi')
   out <- matrix(NA, nrow = length(ic$names), ncol = length(items), dimnames = list(ic$names, items))
   for(i in items) out[, i] <- ic[[i]]
-  print(out) 
+  print(out, ...) 
   return(NULL)
 }
\ No newline at end of file

Modified: pkg/R/ouSim.ouchtree.R
===================================================================
--- pkg/R/ouSim.ouchtree.R	2009-01-14 04:46:34 UTC (rev 152)
+++ pkg/R/ouSim.ouchtree.R	2009-01-14 05:02:11 UTC (rev 153)
@@ -1,4 +1,4 @@
-ouSim.ouchtree <- function(tree, rootState = 0, alpha = 0, variance = 1, theta = rootState, steps = 1000) {
+ouSim.ouchtree <- function(object, rootState = 0, alpha = 0, variance = 1, theta = rootState, steps = 1000, ...) {
 ## function to plot a simulated dataset under brownian motion or Ornstein-Uhlenbeck (OU) model
 ## Arguments:
 ##   tree is an ouch-style (S4) tree

Modified: pkg/R/ouSim.phylo.R
===================================================================
--- pkg/R/ouSim.phylo.R	2009-01-14 04:46:34 UTC (rev 152)
+++ pkg/R/ouSim.phylo.R	2009-01-14 05:02:11 UTC (rev 153)
@@ -1,4 +1,4 @@
-ouSim.phylo <- function(object, rootState = 0, shiftBranches = NULL, shiftStates = NULL, alpha = 0, variance = 1, theta = rootState, model = "OU", branchMeans = NULL, steps = 1000) {
+ouSim.phylo <- function(object, rootState = 0, shiftBranches = NULL, shiftStates = NULL, alpha = 0, variance = 1, theta = rootState, model = "OU", branchMeans = NULL, steps = 1000, ...) {
 ## function to plot a simulated dataset under brownian motion or Ornstein-Uhlenbeck (OU) model
 ## Arguments:
 ##   phy is an ape-style tree

Modified: pkg/man/informationCriterion.Rd
===================================================================
--- pkg/man/informationCriterion.Rd	2009-01-14 04:46:34 UTC (rev 152)
+++ pkg/man/informationCriterion.Rd	2009-01-14 05:02:11 UTC (rev 153)
@@ -5,7 +5,7 @@
 \title{Information criterion and weights for a set of models}
 \description{Returns AIC, AICc, and BIC values and weights for a set of models.}
 \usage{
-  informationCriterion(u = NULL, lnL = NULL, K, n = 1, names = NULL, ...)
+  informationCriterion(u = NULL, lnL = NULL, K, n = 1, names = NULL)
   informationCriterion.hansenBatch(hansenBatch)
   print.informationCriterion(x, ...)
 }
@@ -33,8 +33,13 @@
      }
    \item{hansenBatch}{
      Output from \{runBatchHansen}.
+     }
    \item{x}{
      Output from \{informationCriterion}.
+     }
+   \item{...}{
+     Additional arguments to be passed along to \code{print}
+     }
 }
 \value{
   A list with the following vectors, all indexed by model number:

Modified: pkg/man/ouSim.Rd
===================================================================
--- pkg/man/ouSim.Rd	2009-01-14 04:46:34 UTC (rev 152)
+++ pkg/man/ouSim.Rd	2009-01-14 05:02:11 UTC (rev 153)
@@ -9,20 +9,20 @@
 \title{Discrete-time simulation of Ornstein-Uhlenbeck models on a user tree.}
 \description{
   \code{ouSim} simulates the evolution of a single character for visualization purposes; for parametric bootstrapping,
-  utilize the \code{simulate} methods in \code{ouch}.
+  utilize the \code{simulate} methods in \pkg{ouch}.
 }
 \usage{
   ouSim(object, ...)
-  ouSim.phylo(object, rootState = 0, shiftBranches = NULL, shiftStates = NULL, alpha = 0, variance = 1, theta = rootState, model = "OU", branchMeans = NULL, steps = 1000)
-  ouSim.ouchtree(object, rootState = 0, alpha = 0, variance = 1, theta = rootState, steps = 1000)
+  ouSim.phylo(object, rootState = 0, shiftBranches = NULL, shiftStates = NULL, alpha = 0, variance = 1, theta = rootState, model = "OU", branchMeans = NULL, steps = 1000, ...)
+  ouSim.ouchtree(object, rootState = 0, alpha = 0, variance = 1, theta = rootState, steps = 1000, ...)
   ouSim.browntree(object, ...)
   ouSim.hansentree(object, ...)
   ouSim.hansenBatch(object, ...)
-  ouSim.hansenSummary(analysis, tree, treeNum = 1, rootState = NULL, ...) 
+  ouSim.hansenSummary(object, tree, treeNum = 1, rootState = NULL, ...) 
 }
 \details{
   A call to \code{ouSim} detects the class of \code{object} and behaves as follows:
-  \item{object}{
+  \item{phylo}{
     With an \pkg{ape}-style tree, all parameters of the model are specified by branch. Most flexibility, least convenience.
     }
   \item{ouchtree}{
@@ -46,16 +46,13 @@
     }
   \code{ouSim.phylo} is a very basic simulation engine, but also the most flexible. As written, the user has to specify the 
   model using two vectors that correspond to the branches in an \code{ape}-format tree. It is important to note that
-  this simulation method is really  heuristic device, not appropriate for estimating parameter distributions. For
-  analysis purposes, you should utilize the \code{simulate} and \code{bootstrap} methods in \code{ouch}.
-  }
+  this simulation method is really a heuristic device, not appropriate for estimating parameter distributions. For
+  analysis purposes, you should utilize the \code{simulate} and \code{bootstrap} methods in \pkg{ouch}.
+}
 \arguments{
   \item{object}{
-    In a call to the generic function, an object of class ouchtree, browntree, hansentree, hansenBatch, or hansenSummary.
+    In a call to the generic function, an object of class phylo, ouchtree, browntree, hansentree, hansenBatch, or hansenSummary.
     }
-  \item{phy}{
-    An \code{ape}-style tree, class \code{phylo}.
-    }
   \item{rootState}{
     The character state at the root of the tree. In a {browntree} object, this value is provided. In a {hansentree} or
     {batchHansen} object, the value at the root is not provided, but it is taken to be the equilibrium or optimum 
@@ -95,11 +92,21 @@
     depends on only these parameters (ancestry is not considered, only current mean and variance).
     }
   \item{branchMeans}{
-    For a \code{phylo} tree only. The mean for each branch, utilized only in the "meanVar" model. 
+    For a \code{phylo} tree only. The mean for each branch, utilized only in the \dQuote{meanVar} model. 
     }
   \item{steps}{
     The number of slices into which the tree is divided for simulation.
     }
+  \item{tree}{
+    The \code{ouch}-style tree to simulate on.
+    }
+  \item{treeNum}{
+    In a \code{hansenBatch} or \code{hansenSummary} object, the number of the tree from which analysis
+    parameters should be drawn; should match the tree provided with \code{tree}.
+    }
+  \item{...}{
+    Additional arguments to be passed along to \code{ouSim}.
+    }
 }
 \value{
   A list of class 'ouSim' that describes the phenotype at the beginning and end of each branch segment, as well as the model.



More information about the Mattice-commits mailing list