read_matrix: File input

Description Usage Arguments Details Value See Also

Description

Fast but featureless input of tabular data in either *.txt or *.gz format.

Usage

1
2
3
4
file_stats(filename, sep = "\t", nrows = -1L, skip = 0L, verbose = 1L)

read_matrix(filename, sep = "\t", nrows = 1L, cols = 0L, skip = 0L,
  verbose = 1L)

Arguments

filename

name of a file

sep

character which delimits columns

nrows

number of rows to read

skip

number of rows to skip

verbose

should verbose output be generated

cols

vector of column numbers to include in the matrix

Details

file_stats returns a three element vector containing a summary of a file's contents. 'Total_rows' reports the total number of rows read. This is either the number of rows in the file or the number of skipped rows and the number of rows read in. 'Rows' is the number of rows read in. This is either the same as nrows or however many rows were read in after skip and before the end of the file (when less than nrows). 'Columns' is the number of columns resulting after delimiting with sep. This information is intended to be used with read_matrix.

read_matrix returns a matrix of strings of dimension specified by nrows and cols. The cols parameter is a vector of integers specifying which columns to read in.

Value

file_stats returns a three element vector.

read_matrix returns a matrix of strings

See Also

readr data.table::fread


knausb/coveRage documentation built on May 20, 2019, 12:52 p.m.