Learn R Programming

GWASTools (version 1.18.0)

readWriteFirst: Read and write the first n lines of a file

Description

Read first n lines of filein and write them to fileout, where filein and fileout are file names.

Usage

readWriteFirst(filein, fileout, n)

Arguments

filein
input file
fileout
output file
n
number of lines to write

Examples

Run this code
path <- system.file("extdata", "affy_raw_data", package="GWASdata")
file <- paste(path, list.files(path)[1], sep="/")
outf <- tempfile()
readWriteFirst(file, outf, 20)
file.remove(outf)

Run the code above in your browser using DataLab