readTableIndex
From R.utils v1.4.2
by Henrik Bengtsson
Reads a single column from file in table format
Reads a single column from file in table format, which can then be used as a index-to-row (look-up) map
for fast access to a subset of rows using readTable
().
- Keywords
- IO
Usage
## S3 method for class 'default':
readTableIndex(..., indexColumn=1, colClass="character", verbose=FALSE)
Arguments
Value
- Returns a
vector
.
See Also
readTable
().
Examples
# File containing data table to be access many times
filename <- "somefile.txt"
# Create a look-up index
index <- readTableIndex(filename)
# Keys of interest
keys <- c("foo", "bar", "wah")
# Read only those keys and do it fast
df <- readTable(filename, rows=match(keys, index))
Community examples
Looks like there are no examples yet.