[Blotter-commits] r1043 - in pkg/FinancialInstrument: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jun 9 20:14:28 CEST 2012
Author: gsee
Date: 2012-06-09 20:14:28 +0200 (Sat, 09 Jun 2012)
New Revision: 1043
Modified:
pkg/FinancialInstrument/DESCRIPTION
pkg/FinancialInstrument/R/ls_instruments_by.R
pkg/FinancialInstrument/man/ls_instruments.Rd
pkg/FinancialInstrument/man/ls_instruments_by.Rd
Log:
allow ls_instruments_by to be called with only 1 arg; missing value treated like NULL
Modified: pkg/FinancialInstrument/DESCRIPTION
===================================================================
--- pkg/FinancialInstrument/DESCRIPTION 2012-06-05 23:04:48 UTC (rev 1042)
+++ pkg/FinancialInstrument/DESCRIPTION 2012-06-09 18:14:28 UTC (rev 1043)
@@ -11,7 +11,7 @@
meta-data and relationships. Provides support for
multi-asset class and multi-currency portfolios. Still
in heavy development.
-Version: 0.14.6
+Version: 0.14.7
URL: https://r-forge.r-project.org/projects/blotter/
Date: $Date$
Depends:
Modified: pkg/FinancialInstrument/R/ls_instruments_by.R
===================================================================
--- pkg/FinancialInstrument/R/ls_instruments_by.R 2012-06-05 23:04:48 UTC (rev 1042)
+++ pkg/FinancialInstrument/R/ls_instruments_by.R 2012-06-09 18:14:28 UTC (rev 1043)
@@ -19,10 +19,11 @@
#'
#' list instruments that have a given attribute level with a given value.
#'
-#' @param what what attribute (e.g. currency, type, strike, etc.)
-#' @param value what value must the attribute have (e.g. \sQuote{EUR},
-#' \sQuote{option}, 100, etc.). If \code{NULL} then the names of all
-#' instruments that have a \code{what} slot will be returned
+#' @param what What attribute? (e.g. \dQuote{currency}, \dQuote{type},
+#' \dQuote{strike}, etc.)
+#' @param value What value must the attribute have? (e.g. \dQuote{EUR},
+#' \dQuote{option}, 100, etc.). If missing or \code{NULL}, the names of all
+#' instruments that have a \code{what} slot will be returned
#' @param pattern only return instruments with \code{pattern} in the name
#' @param match should pattern match names exactly?
#' @param in.slot If the attribute you are looking for is stored inside another
@@ -53,7 +54,7 @@
} else if (is.null(pattern)) { #no pattern
symbols <- ls_instruments()
} # else pattern length > 1 & don't match
-
+ if (missing(value)) value <- NULL
tmp_symbols <- NULL
for (symbol in symbols) {
tmp_instr <- try(get(symbol, pos = FinancialInstrument:::.instrument),silent=TRUE)
Modified: pkg/FinancialInstrument/man/ls_instruments.Rd
===================================================================
--- pkg/FinancialInstrument/man/ls_instruments.Rd 2012-06-05 23:04:48 UTC (rev 1042)
+++ pkg/FinancialInstrument/man/ls_instruments.Rd 2012-06-09 18:14:28 UTC (rev 1043)
@@ -5,8 +5,8 @@
\alias{ls_derivatives}
\alias{ls_exchange_rates}
\alias{ls_funds}
+\alias{ls_futures}
\alias{ls_future_series}
-\alias{ls_futures}
\alias{ls_FX}
\alias{ls_guaranteed_spreads}
\alias{ls_ICS}
@@ -14,8 +14,8 @@
\alias{ls_instruments}
\alias{ls_non_currencies}
\alias{ls_non_derivatives}
+\alias{ls_options}
\alias{ls_option_series}
-\alias{ls_options}
\alias{ls_puts}
\alias{ls_spreads}
\alias{ls_stocks}
@@ -25,13 +25,13 @@
\alias{rm_derivatives}
\alias{rm_exchange_rates}
\alias{rm_funds}
+\alias{rm_futures}
\alias{rm_future_series}
-\alias{rm_futures}
\alias{rm_FX}
\alias{rm_instruments}
\alias{rm_non_derivatives}
+\alias{rm_options}
\alias{rm_option_series}
-\alias{rm_options}
\alias{rm_spreads}
\alias{rm_stocks}
\alias{rm_synthetics}
Modified: pkg/FinancialInstrument/man/ls_instruments_by.Rd
===================================================================
--- pkg/FinancialInstrument/man/ls_instruments_by.Rd 2012-06-05 23:04:48 UTC (rev 1042)
+++ pkg/FinancialInstrument/man/ls_instruments_by.Rd 2012-06-09 18:14:28 UTC (rev 1043)
@@ -6,12 +6,12 @@
pattern = NULL, match = TRUE)
}
\arguments{
- \item{what}{what attribute (e.g. currency, type, strike,
- etc.)}
+ \item{what}{What attribute? (e.g. \dQuote{currency},
+ \dQuote{type}, \dQuote{strike}, etc.)}
- \item{value}{what value must the attribute have (e.g.
- \sQuote{EUR}, \sQuote{option}, 100, etc.). If
- \code{NULL} then the names of all instruments that have a
+ \item{value}{What value must the attribute have? (e.g.
+ \dQuote{EUR}, \dQuote{option}, 100, etc.). If missing or
+ \code{NULL}, the names of all instruments that have a
\code{what} slot will be returned}
\item{pattern}{only return instruments with
More information about the Blotter-commits
mailing list