Learn R Programming

easyr (version 0.5-11)

read.txt: Read File as Text

Description

Read File as Text

Usage

read.txt(filename, folder = NA)

Value

Character variable containing the text in the file.

Arguments

filename

File path and name for the file to be read in.

folder

Folder path to look for the file in.

Examples

Run this code

# write a files.
path = tempfile()
cat( "some text", file = path )

# read the file.
read.txt( path )

# cleanum.
file.remove( path )

Run the code above in your browser using DataLab