[R-SIG-Finance] blotter package funciton addTxns

Bos, Roger roger.bos at rothschild.com
Tue May 16 22:03:34 CEST 2017


All,

I cloned the blotter package on github and took a look at the amzn_test.R demo file and I see a call to addTxns, but I don't see that function listed in R folder of the package.  I see addTxn, but not addTxns.  addTxns is listed in the NAMESPACE folder as an exported function.  I can still see the function code by typing the function name, but  Could someone please point out something simple that I am obviously missing?

Thanks,

Roger

### Start Example Code ###

library(blotter)

# Remove portfolio and account data if run previously
try(rm("portfolio.amzn_port","account.amzn_acct",pos=.blotter), silent = TRUE)

# load the example data
data("amzn")
currency("USD")
stock("amzn",currency="USD",multiplier=1)
# Initialize the Portfolio
initPortf("amzn_port",symbols="amzn",initDate="2010-01-14")
initAcct("amzn_acct",portfolios="amzn_port",initDate="2010-01-14", initEq=10000)
# look at the transactions data
amzn.trades
# Add the transactions to the portfolio
blotter:::addTxns("amzn_port","amzn",TxnData=amzn.trades,verbose=TRUE)




This message and any attachments are for the intended recipient’s use only. This message may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by an error in transmission.
If you have received this message in error, please immediately notify the sender by e-mail, delete the message, any attachments and all copies from your system and destroy any hard copies. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message or any attachments if you are not the intended recipient.






More information about the R-SIG-Finance mailing list