Learn R Programming

Kmisc (version 0.5.0)

read: Read a File

Description

These functions read a file into memory. We memory map the file for fast I/O. The file is read in as a character vector (length one for read, length n for readlines).

Usage

read(file)
readlines(file)

Arguments

file
Path to a file.

Examples

Run this code
p <- file.path( R.home(), "NEWS" )
if (file.exists(p))
  stopifnot( identical( readLines(p), readlines(p) ) )

Run the code above in your browser using DataLab