checkStrictOrder {wrMisc} | R Documentation |
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 = FALSE,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
Arguments
dat |
matrix or data.frame |
invertCount |
(logical) inverse counting (ie return 0 for all elememts in order) |
silent |
(logical) suppress messages |
debug |
(logical) display additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
Value
matrix with counts of up pairs, down pairs, equal-pairs, if 'invertCount'=TRUE all non-events are counted, ie a resulting 0 means that all columns are following the described characteristics (with variabale col-numbers easier to count)
See Also
Examples
set.seed(2005); mat1 <- rbind(matrix(round(runif(40),1),nc=4), rep(1,4))
checkStrictOrder(mat1); mat1[which(checkStrictOrder(mat1)[,2]==0),]
[Package wrMisc version 1.15.1 Index]