[R-SIG-Finance] Question in blotter::updatePosPL file: argument is of length zero

Brian G. Peterson brian at braverock.com
Mon Dec 20 13:52:47 CET 2010


On 12/18/2010 10:42 AM, Lei Jin wrote:
> In the file updatePosPL.R, line 35 is
>
> if(ncol(Prices)>1) Prices=getPrice(Prices,Symbol)
>
> However, if the Prices() is NULL (which is by the default parameter to
> this function), then ncol(Prices) is also NULL, and
> this will cause the error below.
>
> Should line 35 checks the prices, not Prices?

Thank you for the report.

I've tested the change and it is now in R-Forge SVN r502.

Regards,

   - Brian

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list