readthat (version 0.0.1)

read: Read file/webpage

Description

Returns text/source from file or URL

Usage

read(.x)

Arguments

.x

Path to file or URL

Value

A string of read-in text

See Also

Other read: readl

Examples

Run this code
# NOT RUN {
## create a temp file containing multiple lines of text
tmp <- tempfile()
cat("TITLE", "", "By", "", "Some more text here", "",
  "last line", sep = "\n", file = tmp)

## read contents from tmp
read(tmp)

## cleanup
unlink(tmp)

## read contents from a website
read("http://httpbin.org/get")

# }

Run the code above in your browser using DataLab