Learn R Programming

jwutil (version 1.2.3)

propRowSorted: proportion of non-descending rows in matrix

Description

first performs isRowSorted to get a logical vector, then sums TRUE values and takes fraction of total

Usage

propRowSorted(x)

Arguments

x

matrix, each row containing ordered or disordered numerics

Value

double, the proportion from 0 to 1