Description Usage Arguments Value Author(s) See Also Examples
These functions extend the respective base functions by (optionally) preserving the shape of the array (i.e. the summed dimensions have length 1).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## S4 method for signature 'matrix'
colSums(x, na.rm = FALSE, dims = 1L, drop = TRUE)
colSums.AsIs(x, ...)
## S4 method for signature 'array'
colSums(x, na.rm = FALSE, dims = 1L, drop = TRUE)
## S4 method for signature 'matrix'
colMeans(x, na.rm = FALSE, dims = 1L, drop = TRUE)
colMeans.AsIs(x, ...)
## S4 method for signature 'array'
colMeans(x, na.rm = FALSE, dims = 1L, drop = TRUE)
## S4 method for signature 'matrix'
rowSums(x, na.rm = FALSE, dims = 1L, drop = TRUE)
rowSums.AsIs(x, ...)
## S4 method for signature 'array'
rowSums(x, na.rm = FALSE, dims = 1L, drop = TRUE)
## S4 method for signature 'matrix'
rowMeans(x, na.rm = FALSE, dims = 1L, drop = TRUE)
rowMeans.AsIs(x, ...)
## S4 method for signature 'array'
rowMeans(x, na.rm = FALSE, dims = 1L, drop = TRUE)
|
x |
an array of two or more dimensions, containing numeric, complex, integer or logical values, or a numeric data frame. |
na.rm |
logical indicating treatment of missing values |
dims |
integer: Which dimensions are regarded as ‘rows’ or ‘columns’ to sum
over. For |
drop |
If |
... |
the |
like colSums
if drop = TRUE
, otherwise an array where the
summed dimensions have length 1.
Claudia Beleites
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.