Description Usage Arguments Details Value Index of implemented methods Note Author(s) See Also
These are generic stubs for lowlevel sorting and ordering methods
implemented in packages 'bit64' and 'ff'. The ..sortorder
methods do
sorting and ordering at once, which requires more RAM than ordering but is
(almost) as fast as as sorting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35  ramsort(x, ...)
ramorder(x, i, ...)
ramsortorder(x, i, ...)
mergesort(x, ...)
mergeorder(x, i, ...)
mergesortorder(x, i, ...)
quicksort(x, ...)
quickorder(x, i, ...)
quicksortorder(x, i, ...)
shellsort(x, ...)
shellorder(x, i, ...)
shellsortorder(x, i, ...)
radixsort(x, ...)
radixorder(x, i, ...)
radixsortorder(x, i, ...)
keysort(x, ...)
keyorder(x, i, ...)
keysortorder(x, i, ...)

x 
a vector to be sorted by 
... 
further arguments to the sorting methods 
i 
integer positions to be modified by 
The sort
generics do sort their argument 'x', some methods need
temporary RAM of the same size as 'x'. The order
generics do order
their argument 'i' leaving 'x' as it was, some methods need temporary RAM of
the same size as 'i'. The sortorder
generics do sort their argument
'x' and order their argument 'i', this way of ordering is much faster at the
price of requiring temporary RAM for both, 'x' and 'i', if the method
requires temporary RAM. The ram
generics are highlevel functions
containing an optimizer that chooses the 'best' algorithms given some
context.
These functions return the number of NAs
found or assumed
during sorting
generic  ff  bit64 
ramsort 
ramsort.default 
ramsort.integer64 
shellsort 
shellsort.default 
shellsort.integer64 
quicksort 
quicksort.integer64 

mergesort 
mergesort.default 
mergesort.integer64 
radixsort 
radixsort.default 
radixsort.integer64 
keysort 
keysort.default  
generic  ff  bit64 
ramorder 
ramorder.default 
ramorder.integer64 
shellorder 
shellorder.default 
shellorder.integer64 
quickorder 
quickorder.integer64 

mergeorder 
mergeorder.default 
mergeorder.integer64 
radixorder 
radixorder.default 
radixorder.integer64 
keyorder 
keyorder.default  
generic  ff  bit64 
ramsortorder 
ramsortorder.integer64 

shellsortorder  shellsortorder.integer64 

quicksortorder
 quicksortorder.integer64 

mergesortorder 
mergesortorder.integer64 

radixsortorder  radixsortorder.integer64 

keysortorder
 
Note that these methods purposely violate the functional programming
paradigm: they are called for the sideeffect of changing some of their
arguments. The rationale behind this is that sorting is very RAMintensive
and in certain situations we might not want to allocate additional memory if
not necessary to do so. The sort
methods change x
, the
order
methods change i
, and the sortoder
methods change
both x
and i
You as the user are responsible to create copies
of the input data 'x' and 'i' if you need nonmodified versions.
Jens OehlschlĂ¤gel <Jens.Oehlschlaegel@truecluster.com>
sort
and order
in base R, bitsort
for faster inteer sorting
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.