[R-SIG-Finance] Blotter updatePortf function can't find historical data in non global environment

Brian G. Peterson brian at braverock.com
Tue Sep 13 01:42:29 CEST 2011


passing env='whateverEnvIuse" or env=.wheteverenvIuse doesn't work?

Please provide a reproducible example, per the posting guide.

  - Brian

On Mon, 2011-09-12 at 19:22 -0400, Charlie Friedemann wrote:
> Greetings,
> 
> I've been working with blotter the past couple days, and one thing  
> I've noticed is that if one calls updatePortf on a portfolio object,  
> it fails:
> 
> Error in get(Symbol, envir=as.environment(.GlobalEnv)) : Object 'SPY'  
> not found.
> 
> I load my daily data in a separate environment using getSymbols, and  
> I'm wondering if there is anyway to get blotter to change which  
> environment it looks for historical price data in. traceback()  
> indicates the call to updatePortf uses the getPrice function in  
> quantmod and passes the .GlobalEnv to it.
> 
> I've tried adding the environment with the price data to the search  
> path, however that did not work.
> 
> Does anyone know a way around this issue? I'd rather not have to keep  
> all necessary data in the global environment if possible. Thanks!
> 
> _______________________________________________
> 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.

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



More information about the R-SIG-Finance mailing list