This internel function determines if a numeric vector X is monotone (increasing or decreasing) or not. Ties in
the sequence are considered as monotone.
a numerical vector to be tested.
Returns True or False.
a <- 1:10 ;
b <- c( 1:5, 4:2 ) ;
c <- c( 1:4, 4, 4, 4, 5:10 ) ;
d <- c( 10:6, 3:-2 ) ;
is.monotone( a )
is.monotone( b )
is.monotone( c )
is.monotone( d )
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.