# 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 all lines of tmp
readl(tmp)
## read first three lines
readl(tmp, 1, 3)
## read lines 3-5
readl(tmp, 3, 5)
## cleanup
unlink(tmp)
# }
Run the code above in your browser using DataCamp Workspace