Re: [Rd] wishlist: decreasing argument to is.unsorted

2014-01-04 Thread Sean O'Riordain
The more general alternative Gabor in this case would be a stopif() function... I often find myself having to think too much with stopifnot(!is.X()) Sean On 4 January 2014 00:24, Gábor Csárdi csardi.ga...@gmail.com wrote: While we are here, how about an is.sorted() function? It is trivial

[Rd] wishlist: decreasing argument to is.unsorted

2014-01-03 Thread Patrick Burns
I've just realized that it could be handy to have a 'decreasing' argument in 'is.unsorted'. And I'm cheekily hoping someone else will implement it. It is easy enough to work around (with 'rev'), but would be less hassle with an argument. The case I have in mind uses 'is.unsorted' in

Re: [Rd] wishlist: decreasing argument to is.unsorted

2014-01-03 Thread Gábor Csárdi
While we are here, how about an is.sorted() function? It is trivial and helps readability a lot imho. Then one does not have to write things like stopifnot(!is.unsorted(x)) but can write stopifnot(is.sorted(x)) instead. Gabor On Fri, Jan 3, 2014 at 1:40 PM, Patrick Burns