[R-SIG-Finance] How to suppress getSymbols error message
Michael Weylandt
michael.weylandt at gmail.com
Tue Dec 29 18:38:40 CET 2015
You can use a sink(NULL) (R equivalent of >/dev/null) to suppress all
output temporarily.
As far as I know, there's no simple way to just catch this one cat().
On Tue, Dec 29, 2015 at 12:34 AM, George Kumar <grgkumar4 at gmail.com> wrote:
> Hi all,
>
> I am using getSymbols to with the following options:
>
> setDefaults(getSymbols,src='csv')
>
> The problem is that when it cannot find the file locally it gives an error
> message like the following:
>
> file abcd.csv does not exist in ....skipping ..
>
> It is coming from the following lines of source code:
>
> if(!file.exists(sym.file)) {
> cat("\nfile ",paste(Symbols[[i]],extension,sep='.')," does not exist ",
> "in ",dir,"....skipping\n")
> next
> }
>
> If would have been nice if the cat statement above was under a if (verbose)
>
> check.
>
> Anyway to suppress this message ? I have tried using try statement too.
> Still no luck.
>
> Thanks in advance.
> George
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
More information about the R-SIG-Finance
mailing list