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

Description Usage Arguments Author(s) Examples

View source: R/utils.R

Description

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

Usage

1
readWriteFirst(filein, fileout, n)

Arguments

filein

input file

fileout

output file

n

number of lines to write

Author(s)

Cathy Laurie

Examples

1
2
3
4
5
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)

GWASTools documentation built on May 31, 2017, 2:56 p.m.

Search within the GWASTools package
Search all R packages, documentation and source code