Learn R Programming

dils (version 0.8.1)

GetSampleFromFile: 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

References

https://github.com/shaptonstahl/

See Also

ScalablePCA, GetSampleFromDataFrame, GetSampleFromDb

Examples

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

Run the code above in your browser using DataLab