ff
vector x
Add a ff vector that contains the order of the ff
vector x
as an attribute.
The order can be retrieved using ffordered
. Note that you have to assign the result to the
original vector x
.
addfforder(x, addsorted = FALSE, ...)ffordered(x)
ffsorted(x)
ff
vector to be indexed
should the sorted values also be stored in ffsorted
?
parameters that will be passed on to fforder
.
The updated vector x
# NOT RUN {
x <- ff(rnorm(10))
# adds an index to x (note the assignment)
x <- addfforder(x)
# retrieve ffindex
o <- ffordered(x)
o
# use it to sort the original vector
x[o]
# }
Run the code above in your browser using DataLab