[med-svn] [r-bioc-biocgenerics] 01/03: Imported Upstream version 0.22.0

Graham Inggs ginggs at moszumanska.debian.org
Fri May 12 15:44:49 UTC 2017


This is an automated email from the git hooks/post-receive script.

ginggs pushed a commit to branch master
in repository r-bioc-biocgenerics.

commit 1922273abdce123b92fd94b0f708791d7f91a20b
Author: Graham Inggs <ginggs at debian.org>
Date:   Fri May 12 16:15:38 2017 +0200

    Imported Upstream version 0.22.0
---
 DESCRIPTION           | 20 +++++++--------
 NAMESPACE             | 13 ++++++++++
 R/is.unsorted.R       |  2 +-
 R/matrix-summary.R    |  8 ++++++
 R/{rank.R => mean.R}  |  5 ++--
 R/rank.R              | 17 ++++++++++++-
 R/replaceSlots.R      |  2 +-
 R/{rank.R => t.R}     |  5 ++--
 R/{rank.R => var.R}   |  7 ++++--
 man/matrix-summary.Rd | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++
 man/mean.Rd           | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
 man/order.Rd          |  2 +-
 man/rank.Rd           |  9 ++++++-
 man/sets.Rd           | 13 +++++-----
 man/t.Rd              | 62 +++++++++++++++++++++++++++++++++++++++++++++++
 man/var.Rd            | 65 +++++++++++++++++++++++++++++++++++++++++++++++++
 16 files changed, 332 insertions(+), 29 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 3d4c0a7..a37a626 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: BiocGenerics
 Title: S4 generic functions for Bioconductor
 Description: S4 generic functions needed by many Bioconductor packages.
-Version: 0.20.0
+Version: 0.22.0
 Author: The Bioconductor Dev Team
 Maintainer: Bioconductor Package Maintainer <maintainer at bioconductor.org>
 biocViews: Infrastructure
@@ -14,13 +14,13 @@ License: Artistic-2.0
 Collate: S3-classes-as-S4-classes.R normarg-utils.R replaceSlots.R
         append.R as.data.frame.R as.list.R as.vector.R cbind.R
         do.call.R duplicated.R eval.R Extremes.R funprog.R get.R grep.R
-        is.unsorted.R lapply.R lengths.R mapply.R match.R nrow.R
-        order.R paste.R rank.R rep.R row_colnames.R sets.R sort.R
-        start.R subset.R table.R tapply.R unique.R unlist.R unsplit.R
-        relist.R which.R boxplot.R image.R density.R IQR.R mad.R
-        residuals.R weights.R xtabs.R clusterApply.R annotation.R
-        combine.R dbconn.R dge.R fileName.R normalize.R
-        organism_species.R plotMA.R plotPCA.R score.R strand.R
-        updateObject.R testPackage.R zzz.R
+        is.unsorted.R lapply.R lengths.R mapply.R match.R
+        matrix-summary.R mean.R nrow.R order.R paste.R rank.R rep.R
+        row_colnames.R sets.R sort.R start.R subset.R t.R table.R
+        tapply.R unique.R unlist.R unsplit.R relist.R var.R which.R
+        boxplot.R image.R density.R IQR.R mad.R residuals.R weights.R
+        xtabs.R clusterApply.R annotation.R combine.R dbconn.R dge.R
+        fileName.R normalize.R organism_species.R plotMA.R plotPCA.R
+        score.R strand.R updateObject.R testPackage.R zzz.R
 NeedsCompilation: no
-Packaged: 2016-10-17 22:55:18 UTC; biocbuild
+Packaged: 2017-04-24 23:11:07 UTC; biocbuild
diff --git a/NAMESPACE b/NAMESPACE
index 0b07e2d..ac94259 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -75,6 +75,13 @@ export(
     ## from R/match.R:
     match,
 
+    ## from R/matrix-summary.R:
+    rowSums, rowMeans,
+    colSums, colMeans,
+
+    ## from R/mean.R:
+    mean,
+
     ## from R/nrow.R:
     nrow, ncol, NROW, NCOL,
 
@@ -107,6 +114,9 @@ export(
     ## from R/subset.R:
     subset,
 
+    ## from R/t.R:
+    t,
+
     ## from R/table.R:
     table,
 
@@ -155,6 +165,9 @@ export(
     ## from R/residuals.R:
     residuals,
 
+    ## from R/var.R:
+    var, sd,
+
     ## from R/weights.R:
     weights,
 
diff --git a/R/is.unsorted.R b/R/is.unsorted.R
index 0c60cbe..bff2cc3 100644
--- a/R/is.unsorted.R
+++ b/R/is.unsorted.R
@@ -7,7 +7,7 @@
 ### the 'ignore.strand' argument for the method for GenomicRanges objects).
 
 .is.unsorted.useAsDefault <- function(x, na.rm=FALSE, strictly=FALSE, ...)
-    base::is.unsorted(x, na.rm, strictly, ...)
+    base::is.unsorted(x, na.rm=na.rm, strictly=strictly, ...)
 
 setGeneric("is.unsorted", signature="x",
     function(x, na.rm=FALSE, strictly=FALSE, ...)
diff --git a/R/matrix-summary.R b/R/matrix-summary.R
new file mode 100644
index 0000000..f3bd4bd
--- /dev/null
+++ b/R/matrix-summary.R
@@ -0,0 +1,8 @@
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Row-level and column-level summary
+###
+
+setGeneric("rowSums", signature="x")
+setGeneric("colSums", signature="x")
+setGeneric("rowMeans", signature="x")
+setGeneric("colMeans", signature="x")
diff --git a/R/rank.R b/R/mean.R
similarity index 73%
copy from R/rank.R
copy to R/mean.R
index 4954af8..1fd70de 100644
--- a/R/rank.R
+++ b/R/mean.R
@@ -1,7 +1,6 @@
 ### =========================================================================
-### The rank() generic
+### The mean() generic
 ### -------------------------------------------------------------------------
 ###
 
-setGeneric("rank", signature="x")
-
+setGeneric("mean")
diff --git a/R/rank.R b/R/rank.R
index 4954af8..488f2af 100644
--- a/R/rank.R
+++ b/R/rank.R
@@ -3,5 +3,20 @@
 ### -------------------------------------------------------------------------
 ###
 
-setGeneric("rank", signature="x")
+### base::rank() doesn't have the ellipsis. We add it to the generic
+### function defined below so methods can support additional arguments (e.g.
+### the 'ignore.strand' argument for the method for GenomicRanges objects).
+
+.is.rank.useAsDefault <- function(x, na.last=TRUE,
+    ties.method=c("average", "first", "last", "random", "max", "min"), ...)
+{
+    base::rank(x, na.last=na.last, ties.method=ties.method, ...)
+}
+
+setGeneric("rank", signature="x",
+    function(x, na.last=TRUE,
+        ties.method=c("average", "first", "last", "random", "max", "min"), ...)
+        standardGeneric("rank"),
+    useAsDefault=.is.rank.useAsDefault
+)
 
diff --git a/R/replaceSlots.R b/R/replaceSlots.R
index b2ef4d5..d6d057c 100644
--- a/R/replaceSlots.R
+++ b/R/replaceSlots.R
@@ -45,7 +45,7 @@ unsafe_replaceSlots <- function(object, ..., .slotList=list())
         if (first_time) {
             ## Triggers a copy.
             slot(object, slot_name, check=FALSE) <- slot_val
-            first_time <<- FALSE
+            first_time <- FALSE
         } else {
             ## In-place modification (i.e. no copy).
             `slot<-`(object, slot_name, check=FALSE, slot_val)
diff --git a/R/rank.R b/R/t.R
similarity index 73%
copy from R/rank.R
copy to R/t.R
index 4954af8..5569a98 100644
--- a/R/rank.R
+++ b/R/t.R
@@ -1,7 +1,6 @@
 ### =========================================================================
-### The rank() generic
+### The t() generic
 ### -------------------------------------------------------------------------
 ###
 
-setGeneric("rank", signature="x")
-
+setGeneric("t")
diff --git a/R/rank.R b/R/var.R
similarity index 51%
copy from R/rank.R
copy to R/var.R
index 4954af8..f825d9c 100644
--- a/R/rank.R
+++ b/R/var.R
@@ -1,7 +1,10 @@
 ### =========================================================================
-### The rank() generic
+### The var() and sd() generics
 ### -------------------------------------------------------------------------
 ###
+### Dispatches only on 'x' (and 'y' for var)
+###
 
-setGeneric("rank", signature="x")
+setGeneric("var", signature=c("x", "y"))
 
+setGeneric("sd", signature="x")
diff --git a/man/matrix-summary.Rd b/man/matrix-summary.Rd
new file mode 100644
index 0000000..5464e7e
--- /dev/null
+++ b/man/matrix-summary.Rd
@@ -0,0 +1,67 @@
+\name{matrix-summary}
+
+\alias{rowSums}
+\alias{colSums}
+\alias{rowMeans}
+\alias{colMeans}
+
+\title{Form Row and Column Sums and Means}
+
+\description{
+  Form row and column sums and means for rectangular objects..
+
+  NOTE: This man page is for the \code{rowSums}, \code{colSums},
+  \code{rowMeans}, and \code{colMeans} \emph{S4 generic functions}
+  defined in the \pkg{BiocGenerics} package.
+  See \code{?base::\link[base]{colSums}} for the default methods
+  (defined in the \pkg{base} package).
+  Bioconductor packages can define specific methods for objects
+  (typically array-like) not supported by the default method.
+}
+
+\usage{
+     colSums (x, na.rm = FALSE, dims = 1)
+     rowSums (x, na.rm = FALSE, dims = 1)
+     colMeans(x, na.rm = FALSE, dims = 1)
+     rowMeans(x, na.rm = FALSE, dims = 1)
+}
+
+\arguments{
+  \item{x}{
+    a rectangular object, like a matrix or data frame
+  }
+  \item{na.rm, dims}{see \link[base]{colSums}}
+}
+
+\value{
+  See \code{?base::\link[base]{colSums}} for the value returned by the
+  default methods.
+
+  Specific methods defined in Bioconductor packages will typically
+  return an object of the same class as the input object.
+}
+
+\seealso{
+  \itemize{
+    \item \code{base::\link[base]{colSums}} for the default
+    \code{colSums}, \code{rowSums}, \code{colMeans}, and \code{colSums}
+    methods.
+
+    \item \code{\link[methods]{showMethods}} for displaying a summary of the
+          methods defined for a given generic function.
+
+    \item \code{\link[methods]{selectMethod}} for getting the definition of
+          a specific method.
+
+    \item \link{BiocGenerics} for a summary of all the generics defined
+          in the \pkg{BiocGenerics} package.
+  }
+}
+
+\examples{
+colSums
+showMethods("colSums")
+selectMethod("colSums", "ANY")  # the default method
+}
+
+\keyword{methods}
diff --git a/man/mean.Rd b/man/mean.Rd
new file mode 100644
index 0000000..ba86629
--- /dev/null
+++ b/man/mean.Rd
@@ -0,0 +1,64 @@
+\name{mean}
+
+\alias{mean}
+
+\title{Arithmetic Mean}
+
+\description{
+  Generic function for the (trimmed) arithmetic mean.
+  
+  NOTE: This man page is for the \code{mean} \emph{S4 generic function}
+  defined in the \pkg{BiocGenerics} package.
+  See \code{?base::\link[base]{mean}} for the default method
+  (defined in the \pkg{base} package).
+  Bioconductor packages can define specific methods for objects
+  (typically vector-like) not supported by the default method.
+}
+
+\usage{
+mean(x, ...)
+}
+
+\arguments{
+  \item{x}{
+    typically a vector-like object
+  }
+  \item{...}{
+    see \code{\link[base]{mean}}
+  }
+}
+
+\value{
+  See \code{?base::\link[base]{mean}} for the value returned by the
+  default method.
+
+  Specific methods defined in Bioconductor packages will typically
+  return an object of the same class as the input object.
+}
+
+\seealso{
+  \itemize{
+    \item \code{base::\link[base]{mean}} for the default \code{mean} method.
+
+    \item \code{\link[methods]{showMethods}} for displaying a summary of the
+          methods defined for a given generic function.
+
+    \item \code{\link[methods]{selectMethod}} for getting the definition of
+          a specific method.
+
+    \item \link[S4Vectors]{mean,Rle-method} in the \pkg{S4Vectors} package
+          for an example of a specific \code{mean} method (defined for
+          \link[S4Vectors]{Rle} objects).
+
+    \item \link{BiocGenerics} for a summary of all the generics defined
+          in the \pkg{BiocGenerics} package.
+  }
+}
+
+\examples{
+mean
+showMethods("mean")
+selectMethod("mean", "ANY")  # the default method
+}
+
+\keyword{methods}
diff --git a/man/order.Rd b/man/order.Rd
index d931df4..28af540 100644
--- a/man/order.Rd
+++ b/man/order.Rd
@@ -18,7 +18,7 @@
 }
 
 \usage{
-order(..., na.last=TRUE, decreasing=FALSE, method=c("shell", "radix"))
+order(..., na.last=TRUE, decreasing=FALSE, method=c("auto", "shell", "radix"))
 }
 
 \arguments{
diff --git a/man/rank.Rd b/man/rank.Rd
index e20574a..e3fe5ff 100644
--- a/man/rank.Rd
+++ b/man/rank.Rd
@@ -18,7 +18,8 @@
 
 \usage{
 rank(x, na.last=TRUE,
-     ties.method=c("average", "first", "last", "random", "max", "min"))
+     ties.method=c("average", "first", "last", "random", "max", "min"),
+     ...)
 }
 
 \arguments{
@@ -29,6 +30,12 @@ rank(x, na.last=TRUE,
     See \code{?base::\link[base]{rank}} for a description of
     these arguments.
   }
+  \item{...}{
+    Additional arguments, for use in specific methods.
+
+    Note that \code{base::\link[base]{rank}} (the default method) only
+    takes the \code{x}, \code{na.last}, and \code{ties.method} arguments.
+  }
 }
 
 \value{
diff --git a/man/sets.Rd b/man/sets.Rd
index 50cf11a..eeb3c52 100644
--- a/man/sets.Rd
+++ b/man/sets.Rd
@@ -54,9 +54,9 @@ setdiff(x, y, ...)
   binary operation, this typically allows methods to add extra arguments
   for controlling/altering the behavior of the operation.
   Like for example the \code{ignore.strand} argument supported by the
-  \code{setdiff} method for \link[GenomicRanges]{GRanges} objects (defined
-  in the \pkg{GenomicRanges} package). (Note that the \code{union} and
-  \code{intersect} methods for those objects also support the
+  \code{setdiff} method for \link[GenomicRanges]{GenomicRanges} objects
+  (defined in the \pkg{GenomicRanges} package). (Note that the \code{union}
+  and \code{intersect} methods for those objects also support the
   \code{ignore.strand} argument.)
 }
 
@@ -71,9 +71,10 @@ setdiff(x, y, ...)
     \item \code{\link[methods]{selectMethod}} for getting the definition of
           a specific method.
 
-    \item \link[GenomicRanges]{union,GRanges,GRanges-method} in the
-          \pkg{GenomicRanges} package for an example of a specific \code{union}
-          method (defined for \link[GenomicRanges]{GRanges} objects).
+    \item \link[GenomicRanges]{union,GenomicRanges,GenomicRanges-method} in
+          the \pkg{GenomicRanges} package for examples of specific
+          \code{union}, \code{intersect}, and \code{setdiff} methods (defined
+          for \link[GenomicRanges]{GenomicRanges} objects).
 
     \item \link{BiocGenerics} for a summary of all the generics defined
           in the \pkg{BiocGenerics} package.
diff --git a/man/t.Rd b/man/t.Rd
new file mode 100644
index 0000000..e5480bf
--- /dev/null
+++ b/man/t.Rd
@@ -0,0 +1,62 @@
+\name{t}
+
+\alias{t}
+
+\title{Matrix Transponse}
+
+\description{
+  Given a rectangular object \code{x}, \code{t} returns the
+  transpose of \code{x}.
+
+  NOTE: This man page is for the \code{t} \emph{S4 generic function}
+  defined in the \pkg{BiocGenerics} package.
+  See \code{?base::\link[base]{t}} for the default method
+  (defined in the \pkg{base} package).
+  Bioconductor packages can define specific methods for objects
+  (typically array-like) not supported by the default method.
+}
+
+\usage{
+t(x)
+}
+
+\arguments{
+  \item{x}{
+    a rectangular object, like a matrix or data frame
+  }
+}
+
+\value{
+  See \code{?base::\link[base]{t}} for the value returned by the
+  default method.
+
+  Specific methods defined in Bioconductor packages will typically
+  return an object of the same class as the input object.
+}
+
+\seealso{
+  \itemize{
+    \item \code{base::\link[base]{t}} for the default \code{t} method.
+
+    \item \code{\link[methods]{showMethods}} for displaying a summary of the
+          methods defined for a given generic function.
+
+    \item \code{\link[methods]{selectMethod}} for getting the definition of
+          a specific method.
+
+    \item \link[S4Vectors]{t,Hits-method} in the \pkg{S4Vectors} package
+          for an example of a specific \code{t} method (defined for
+          \link[S4Vectors]{Hits} objects).
+
+    \item \link{BiocGenerics} for a summary of all the generics defined
+          in the \pkg{BiocGenerics} package.
+  }
+}
+
+\examples{
+t
+showMethods("t")
+selectMethod("t", "ANY")  # the default method
+}
+
+\keyword{methods}
diff --git a/man/var.Rd b/man/var.Rd
new file mode 100644
index 0000000..a942f0e
--- /dev/null
+++ b/man/var.Rd
@@ -0,0 +1,65 @@
+\name{var}
+
+\alias{var}
+\alias{sd}
+
+\title{Variance and Standard Deviation}
+
+\description{
+  \code{var} and \code{sd} compute the variance and standard deviation
+  of a vector \code{x}.
+
+  NOTE: This man page is for the \code{var} and \code{sd},
+  \emph{S4 generic functions} defined in the \pkg{BiocGenerics} package.
+  See \code{?stats::\link[stats]{var}} and \code{?stats::\link[stats]{sd}}
+  for the default methods (defined in the \pkg{stats} package).
+  Bioconductor packages can define specific methods for objects
+  (typically array-like) not supported by the default method.
+}
+
+\usage{
+     var(x, y = NULL, na.rm = FALSE, use)
+     sd(x, na.rm = FALSE)
+}
+
+\arguments{
+  \item{x}{
+    a vector-like object
+  }
+  \item{y}{
+    a vector-like object, or \code{NULL}
+  }
+  \item{na.rm, use}{see \link[stats]{var}}
+}
+
+\value{
+  See \code{?stats::\link[stats]{var}} and \code{?stats::\link[stats]{sd}}
+  for the value returned by the default methods.
+
+  Specific methods defined in Bioconductor packages will typically
+  return an object of the same class as the input object.
+}
+
+\seealso{
+  \itemize{
+    \item \code{stats::\link[stats]{var}} and \code{stats::\link[stats]{sd}}
+          for the default methods.
+
+    \item \code{\link[methods]{showMethods}} for displaying a summary of the
+          methods defined for a given generic function.
+
+    \item \code{\link[methods]{selectMethod}} for getting the definition of
+          a specific method.
+
+    \item \link{BiocGenerics} for a summary of all the generics defined
+          in the \pkg{BiocGenerics} package.
+  }
+}
+
+\examples{
+var
+showMethods("var")
+selectMethod("var", "ANY")  # the default method
+}
+
+\keyword{methods}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-bioc-biocgenerics.git



More information about the debian-med-commit mailing list