GetSampleFromFile: Sample from the rows of a (possibly large) text file (NOT...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/GetSampleFromFile.R

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

1
  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

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

dils documentation built on May 2, 2019, 8:28 a.m.