[Blotter-commits] r521 - in pkg/FinancialInstrument: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Jan 2 15:37:36 CET 2011
Author: braverock
Date: 2011-01-02 15:37:36 +0100 (Sun, 02 Jan 2011)
New Revision: 521
Modified:
pkg/FinancialInstrument/R/instrument.R
pkg/FinancialInstrument/R/load.instruments.R
pkg/FinancialInstrument/man/FinancialInstrument-package.Rd
pkg/FinancialInstrument/man/getInstrument.Rd
pkg/FinancialInstrument/man/setSymbolLookup.FI.Rd
Log:
- updates to docs to pass R CMD check
Modified: pkg/FinancialInstrument/R/instrument.R
===================================================================
--- pkg/FinancialInstrument/R/instrument.R 2011-01-02 14:35:42 UTC (rev 520)
+++ pkg/FinancialInstrument/R/instrument.R 2011-01-02 14:37:36 UTC (rev 521)
@@ -337,6 +337,7 @@
#' primary accessor function for getting objects of type 'instrument'
#' @param x string identifier of instrument to retrieve
#' @param Dates date range to retrieve 'as of', may not currently be implemented
+#' @param silent if TRUE, will not warn on failure, default FALSE
#' @export
getInstrument <- function(x, Dates=NULL, silent=FALSE){
tmp_instr<-try(get(x,pos=.instrument),silent=TRUE) #removed inherits=TRUE
Modified: pkg/FinancialInstrument/R/load.instruments.R
===================================================================
--- pkg/FinancialInstrument/R/load.instruments.R 2011-01-02 14:35:42 UTC (rev 520)
+++ pkg/FinancialInstrument/R/load.instruments.R 2011-01-02 14:37:36 UTC (rev 521)
@@ -135,9 +135,10 @@
#' the data by days, which is why that option is the default.
#'
#' @param base_dir string specifying the base directory where data is stored, see Details
+#' @param \dots any other passthru parameters
#' @param storage_method currently only \sQuote{rda}, but we will eventually support \sQuote{indexing} at least, and maybe others
#' @param split_method string specifying the method files are split, currently \sQuote{days} or \sQuote{common}, see Details
-#' @param ... any other passthru parameters
+#' @param use_identifier string identifying which column should be use to construct the \code{primary_id} of the instrument, default 'primary_id'
#' @param extension file extension, default "rda"
#' @seealso \code{\link{load.instruments}}
#' \code{\link{getSymbols.FI}}
Modified: pkg/FinancialInstrument/man/FinancialInstrument-package.Rd
===================================================================
--- pkg/FinancialInstrument/man/FinancialInstrument-package.Rd 2011-01-02 14:35:42 UTC (rev 520)
+++ pkg/FinancialInstrument/man/FinancialInstrument-package.Rd 2011-01-02 14:37:36 UTC (rev 521)
@@ -23,10 +23,11 @@
That flexibility also extends to creating instruments that the package doesn't define. \code{@TODO: Create an example of an instrument not covered by the package, such as a corporate bond.} We would greatly appreciate any contributions in this vein.
-Defining instruments can be tedious, so we've also included a CSV loader in in the package too. See \code{\link{loadInstrument}} for detail.
+Defining instruments can be tedious, so we've also included a CSV loader in in the package too. See \code{\link{load.instruments}} for detail.
+Once you've defined all these instruments (we keep hundreds or thousands of them in our environments), and you keep a local store of all your historical market data, you may want to use \code{\link{setSymbolLookup.FI}} to define where and how they are stored so that \code{\link[quantmod]{getSymbols}} will work for you.
+
FinancialInstrument's functions build and manipulate objects that are stored in an environment named ".instrument" rather than the global environment, \code{.GlobalEnv}. Objects may be listed using \code{ls(envir=.instrument)}. See \code{\link{environment}} for more detail.
-
We do that for two reasons. First, it keeps the user's workspace less cluttered and lowers the probability of clobbering something. Second, it allows the user to save and re-use the \code{.instrument} environment in other workspaces. Objects created with FinancialInstrument may be directly manipulated as any other object, but in our use so far we've found that it's relatively rare to do so. Use the \code{\link{getInstrument}} function to query the contract specs of a particular instrument from the environment.
}
Modified: pkg/FinancialInstrument/man/getInstrument.Rd
===================================================================
--- pkg/FinancialInstrument/man/getInstrument.Rd 2011-01-02 14:35:42 UTC (rev 520)
+++ pkg/FinancialInstrument/man/getInstrument.Rd 2011-01-02 14:37:36 UTC (rev 521)
@@ -4,4 +4,5 @@
\usage{getInstrument(x, Dates, silent=FALSE)}
\description{primary accessor function for getting objects of type 'instrument'}
\arguments{\item{x}{string identifier of instrument to retrieve}
-\item{Dates}{date range to retrieve 'as of', may not currently be implemented}}
+\item{Dates}{date range to retrieve 'as of', may not currently be implemented}
+\item{silent}{if TRUE, will not warn on failure, default FALSE}}
Modified: pkg/FinancialInstrument/man/setSymbolLookup.FI.Rd
===================================================================
--- pkg/FinancialInstrument/man/setSymbolLookup.FI.Rd 2011-01-02 14:35:42 UTC (rev 520)
+++ pkg/FinancialInstrument/man/setSymbolLookup.FI.Rd 2011-01-02 14:37:36 UTC (rev 521)
@@ -19,7 +19,8 @@
\code{\link{load.instruments}}
\code{\link[quantmod]{setSymbolLookup}}}
\arguments{\item{base_dir}{string specifying the base directory where data is stored, see Details}
+\item{\dots}{any other passthru parameters}
\item{storage_method}{currently only \sQuote{rda}, but we will eventually support \sQuote{indexing} at least, and maybe others}
\item{split_method}{string specifying the method files are split, currently \sQuote{days} or \sQuote{common}, see Details}
-\item{...}{any other passthru parameters}
+\item{use_identifier}{string identifying which column should be use to construct the \code{primary_id} of the instrument, default 'primary_id'}
\item{extension}{file extension, default "rda"}}
More information about the Blotter-commits
mailing list