In case anyone is still looking at this question 3 years later, Hadley Wickham's readr package has a handy read_file()
function that will do this for you.
# you only need to do this one time on your system
install.packages("readr")
library(readr)
mystring <- read_file("path/to/myfile.txt")