Displaying 2 results from an estimated 2 matches for "isunsorted".
2019 Jan 05
1
unsorted - suggestion for performance improvement and ALTREP support for POSIXct
I believe the performance of isUnsorted() in sort.c could be improved by
calling REAL() once (outside of the for loop), rather than calling it twice
inside the loop. As an aside, it is implemented in the faster way in
doSort() (sort.c line 401). The example below shows the performance
improvement for a vectors of double of moving REAL...
2013 Apr 24
1
multiple issues with is.unsorted()
...; is.unsorted(NA)
[1] NA
> length(list(NA))
[1] 1
> is.unsorted(list(NA))
[1] NA
=> Contradicts "all objects of length 0 or 1 are sorted".
> is.unsorted(raw(2))
Error in is.unsorted(raw(2)) : unimplemented type 'raw' in
'isUnsorted'
=> Doesn't agree with the doc (unless "except for atomic vectors"
means "it might fail for atomic vectors").
> setClass("A", representation(aa="integer"))
> a <- new("A", aa=4:1)
> length(a)
[1]...