Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ffdfsort

Sorting: convenience wrappers for data.frames


Description

These functions allow convenient sorting and ordering of collections of (ff) vectors organized in (ffdf) data.frames

Usage

dforder(x, ...)
dfsort(x, ...)
ramdforder(x, ...)
ramdfsort(x, ...)
ffdforder(x, ...)
ffdfsort(x, ...)

Arguments

x

a data.frame (for dforder, dfsort, ramorder, ramsort) or an ffdf object (for ffdforder, ffdfsort)

...

further arguments passed to sort, ramsort or ffsort (for objects with one column) or passed to order, ramorder or fforder (for objects with mulitple columns)

Value

the order functions return an (ff) vector of integer order positions, the sort functions return a sorted clone of the (ffdf) input data.frame

Author(s)

Jens Oehlschlägel

See Also

Examples

x <- ff(sample(1e5, 1e6, TRUE))
   y <- ff(sample(1e5, 1e6, TRUE))
   z <- ff(sample(1e5, 1e6, TRUE))
   d <- ffdf(x, y, z)
   d2 <- ffdfsort(d)
   d2
   d
   d2 <- d[1:2]
   i <- ffdforder(d2)
   d[i,]
   rm(x, y, z, i, d, d2)
   gc()

ff

Memory-Efficient Storage of Large Data on Disk and Fast Access Functions

v4.0.4
GPL-2 | GPL-3 | file LICENSE
Authors
Daniel Adler [aut], Christian Gläser [aut], Oleg Nenadic [aut], Jens Oehlschlägel [aut, cre], Martijn Schuemie [aut], Walter Zucchini [aut]
Initial release
2020-10-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.