Learn R Programming

easyr (version 0.5-2)

read.txt: Read File as Text

Description

Read File as Text

Usage

read.txt(filename, folder = NA)

Arguments

filename

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

folder

Folder path to look for the file in.

Value

Character variable containing the text in the file.

Examples

Run this code
# NOT RUN {
# 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