Learn R Programming

wrMisc (version 1.2.3)

checkStrictOrder: Check for strict (ascencing or descending) order

Description

checkStrictOrder tests lines of 'dat' (matrix of data.frame) for strict order (ascending, descending or constant), each col of data is tested relative to the col on its left.

Usage

checkStrictOrder(dat, invertCount = TRUE)

Arguments

dat

matrix or data.frame

invertCount

(logical)

Value

matrix with counts of (non-)up pairs, (non-)down pairs, (non-)equal-pairs, if 'invertCount'=TRUE resulting 0 means that all columns are folowing the described characteristics (with variabale col-numbers easier to count)

See Also

order

Examples

Run this code
# NOT RUN {
set.seed(2005); mat <- matrix(round(runif(40),1),nc=4)
checkStrictOrder(mat); mat[which(checkStrictOrder(mat)[,2]==0),]
# }

Run the code above in your browser using DataLab