DFI.getIndex {bsearchtools} | R Documentation |
Extract the index information of a DFI object
Description
Return the index data (i.e. ordered indexes, and sorted values) of an indexed column of a DFI object
Usage
DFI.getIndex(DFIobj,name)
Arguments
DFIobj |
a DFI object |
name |
the name of the indexed column in the DFI object |
Value
A list with two values:
idxs |
the indexes used to sort the column values (as returned by |
sorted |
the sorted values of the column (as returned by |
See Also
Examples
### create a simple DFIobj
DF <- data.frame(Foo=c(3,5,7,1,5,8,7,10),
Bar=c("A","B","B","C","B","B","C","A"),
Baz=c(TRUE,FALSE),
stringsAsFactors=FALSE)
DFIobj <- DFI(DF, c("Foo","Bar")) # create a DFI from DF with indexes on "Foo" and "Bar" columns
### get the index data of 'Bar' column
DFI.getIndex(DFIobj,"Bar")
[Package bsearchtools version 0.0.61 Index]