Learn R Programming

bsearchtools (version 0.0.59)

DFI.getIndex: 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: A list with two values:

See Also

DFI

Examples

Run this code
### 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")

Run the code above in your browser using DataLab