Returns text/source from file or URL
read(.x)
Path to file or URL
A string of read-in text
Other read: readl
# 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