Hi, Jeff:

thanks for your reply. currently I use R's exception handling mechanism:

if (inherits(try({getFinancials(Symbol=ticker, src='google')}, silent = TRUE), "try-error")) {
 ...
}

However, if really need to do something gracefully, I think it has to be done inside quantmod.

Andy


--- On Thu, 3/19/09, Jeff Ryan <jeff.a.ryan@gmail.com> wrote:
From: Jeff Ryan <jeff.a.ryan@gmail.com>
Subject: Re: [R-SIG-Finance] quantmod: getFinancials error
To: andyzhu35@yahoo.com
Cc: r-sig-finance@stat.math.ethz.ch
Date: Thursday, March 19, 2009, 5:23 PM

Hi Andy,

getFin screen-scrapes google.  It is pretty reliable, but not perfect.

The problem here is that there is no quarterly data on the site for
ANAT, so the function just fails.

see: http://www.google.com/finance?fstype=ci&q=NASDAQ:ANAT

I'll see if I can figure out a solution, but it may be more of a
one-off hack than really a solution.

See what you can come up with to solve this, and please share your successes!

Jeff

On Thu, Mar 19, 2009 at 4:09 PM, Andy Zhu <andyzhu35@yahoo.com> wrote:
> ANAT is a valid ticker in google finance.
>
> However, the following code generates error in quantmod: getFinancials
>
>> stock='ANAT';
>> getFinancials(Symbol=stock, src='google');
> Error in getFinancials(Symbol = stock, src = "google") :
>   subscript out of bounds
>
> what is wrong here?
>
> Thanks in advance.
>
>
>
>
>
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-SIG-Finance@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>



-- 
Jeffrey Ryan
jeffrey.ryan@insightalgo.com

ia: insight algorithmics
www.insightalgo.com



      
	[[alternative HTML version deleted]]

