Learn R Programming

SequentialDesign (version 1.0)

fun.decum: Decumulate Values in a Matrix

Description

The function takes a matrix of values that have accumulated over rows and returns a matrix of the incremental increase between each row. Do not run fun.decum as a stand-alone function

Usage

fun.decum(matrix)

Arguments

matrix

This is a matrix of values to be decumulated where the cumulation occurs over rows within the same column.

Examples

Run this code
# NOT RUN {
testarray <- array(NA, dim=c(5,2,2))
testarray[,,1] <- cbind(c(1:5), c(1:5)*2)
testarray[,,2] <- cbind(c(1:5)*1.5, c(1:5)*3)
fun.decum(testarray)
# }

Run the code above in your browser using DataLab