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.
blotter package funciton addTxns
2 messages · Bos, Roger, Brian G. Peterson
The code and documentation for the addTxns function are in the addTxn.R file (lines 167-201).
On Tue, 2017-05-16 at 20:03 +0000, Bos, Roger wrote:
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.
_______________________________________________ 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.