Learn R Programming

quantable (version 0.3.6)

sumtop: sums top rows of matrix uses median of row to determine row order

Description

sums top rows of matrix uses median of row to determine row order

Usage

sumtop(x, top = 3)

Arguments

x

a matrix

top

how many to rows to sum (default 3)

Examples

Run this code
# NOT RUN {
tmp <- rbind(rep(1,times = 4), rep(2,times=4), rep(3,times=4), rep(4,times=4))
res <- sumtop(tmp)
stopifnot(res == c(9,9,9,9))

# }

Run the code above in your browser using DataLab