Learn R Programming

rbamtools (version 2.16.17)

countTextLines: countTextLines: Counting lines in text files.

Description

The countTextLines function takes a filename vector and returns the number of lines contained in each file.

Usage

countTextLines(filenames)

Arguments

filenames

Character. Vector of file-names to be opened.

Details

Fastq files usually (but not guaranteed) contain four lines of text for each read. In many cases, this function can be used to count the number of reads in a fastq file.

Examples

Run this code
# NOT RUN {
filename <- system.file("extdata", "test.fastq", package="rbamtools")
countTextLines(filename)
# }

Run the code above in your browser using DataLab