GetSampleFromFile {dils}R Documentation

Sample from the rows of a (possibly large) text file (NOT IMPLEMENTED)

Description

Read a large text file in batches, keeping the rows to be included in the sample. Return a data.frame whose rows are the sample.

Usage

  GetSampleFromFile(n, out.of, filename)

Arguments

n

numeric, size of sample to be taken.

out.of

numeric, number of rows in the data set not including the header.

filename

character, name of the file containing the data. This must be a tab-delimited file with a header row formatted per the default options for read.delim.

Value

data.frame, size n random subset of the rows of filename

Author(s)

Stephen R. Haptonstahl srh@haptonstahl.org

References

https://github.com/shaptonstahl/

See Also

ScalablePCA, GetSampleFromDataFrame, GetSampleFromDb

Examples

## Not run: x <- dils:::GetSampleFromFile(10, 150, "folder/containing/data.txt")

[Package dils version 0.8.1 Index]