Learn R Programming

salad (version 1.2)

colSums: Row and column sums and means

Description

Method extending to dual matrices the corresponding methods for dual matrices.

Usage

rowSums.dual(x, na.rm = FALSE, dims = 1, ...)

# S4 method for dual rowSums(x, na.rm = FALSE, dims = 1, ...)

colSums.dual(x, na.rm = FALSE, dims = 1, ...)

# S4 method for dual colSums(x, na.rm = FALSE, dims = 1, ...)

rowMeans.dual(x, na.rm = FALSE, dims = 1, ...)

# S4 method for dual rowMeans(x, na.rm = FALSE, dims = 1, ...)

colMeans.dual(x, na.rm = FALSE, dims = 1, ...)

# S4 method for dual colMeans(x, na.rm = FALSE, dims = 1, ...)

Value

a dual object (usually a dual vector).

Arguments

x

a dual matrix or array

na.rm

if 'TRUE', missing values are removed

dims

which dimensions are regarded as rows and cols

...

extra parameters (ignored)

Examples

Run this code
x <- dual( c(1,2) )
x <- cbind(x, 2*x+1)
rowSums(x)
d(rowSums(x), "x1")

Run the code above in your browser using DataLab