I would like to read a binary file — of indeterminate length — directly from a URL in R. Using readBin to read from a URL, without specifying the file size, does not work.
anImage <- readBin('http://user2010.org/pics/useR-large.png','raw')
Is there another approach that would allow this?
This will download the file to the working directory, but not directly into memory.
download.file('http://user2010.org/pics/useR-large.png', 'anImage.png')The Rcurl package may also do what you want. (link not posted because of SO restrictions)