Learn R Programming

readr (version 0.1.1)

read_file: Read a file into a string.

Description

Read a file into a string.

Usage

read_file(file)

Arguments

file
Either a path to a file, a connection, or literal data (either a single string or a raw vector).

Files ending in .gz, .bz2, .xz, or .zip will be automatically uncompressed. Files starting with

Examples

Run this code
read_file(file.path(R.home(), "COPYING"))

Run the code above in your browser using DataLab