The following code
x <- getSymbols(Symbols="RU1000TR",
warnings=FALSE,
env=NULL,
src="FRED")
always seems to return a warning message such as:
Warning message:
In download.file(url, destfile, method, quiet, mode, cacheOK, extra) :
downloaded length 189629 != reported length 200
(this happens for other symbols as well). This is an annoyance, as I cannot find a way to prevent the warning, but the actual data seems to be fine. try, tryCatch, and even sink(tmpfile, type="message") fail to catch/prevent the message as well. Since it's not fatal, is it something to live with?
These warnings are thrown by download.file
. They mean the remote file system reports a file of length 200, but a different size file was actually downloaded. They can be ignored.
You can wrap your getSybmols
calls in suppressWarnings
if you want to keep them from being printed to the console.