[Blotter-commits] r1103 - in pkg/FinancialInstrument: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 9 17:08:11 CEST 2012
Author: gsee
Date: 2012-07-09 17:08:11 +0200 (Mon, 09 Jul 2012)
New Revision: 1103
Modified:
pkg/FinancialInstrument/R/CompareInstrumentFiles.R
pkg/FinancialInstrument/man/CompareInstrumentFiles.Rd
Log:
update docs
Modified: pkg/FinancialInstrument/R/CompareInstrumentFiles.R
===================================================================
--- pkg/FinancialInstrument/R/CompareInstrumentFiles.R 2012-07-09 14:59:51 UTC (rev 1102)
+++ pkg/FinancialInstrument/R/CompareInstrumentFiles.R 2012-07-09 15:08:11 UTC (rev 1103)
@@ -2,22 +2,24 @@
#'
#' Compare the .instrument environments of two files
#'
-#' This will load 2 instrument files (created by \code{\link{saveInstruments}})
-#' and find the differences between them. It will produce messages
-#' indicating the number of instruments that were added, the number of
+#' This will load two instrument files (created by
+#' \code{\link{saveInstruments}}) and find the differences between them. In
+#' addition to returning a list of difference that are found, it will produce
+#' messages indicating the number of instruments that were added, the number of
#' instruments that were removed, and the number of instruments that are
-#' different
+#' different.
#'
-#' @param file1 file containing an instrument environment
-#' @param file2 another file containing an instrument environment
-#' @param ... arguments to pass to \code{\link{all.equal.instrument}}
+#' @param file1 A file containing an instrument environment
+#' @param file2 Another file containing an instrument environment
+#' @param ... Arguments to pass to \code{\link{all.equal.instrument}}
#' @return A list that contains the names of all instruments that were added,
#' the names of all instruments that were removed, and the changes to all
#' instruments that were updated (per \code{\link{all.equal.instrument}}).
#' @author Garrett See
#' @seealso \code{\link{saveInstruments}}, \code{\link{all.equal.instrument}}
-#' @examples
-#backup current .instrument environment
+#' @examples
+#' \dontrun{
+#' #backup current .instrument environment
#' bak <- as.list(FinancialInstrument:::.instrument, all.names=TRUE)
#' old.wd <- getwd()
#' tmpdir <- tempdir()
@@ -35,6 +37,7 @@
#' #Clean up
#' setwd(old.wd)
#' reloadInstruments(bak)
+#' }
#' @export
CompareInstrumentFiles <- function(file1, file2, ...) {
stopifnot(require("FinancialInstrument"))
Modified: pkg/FinancialInstrument/man/CompareInstrumentFiles.Rd
===================================================================
--- pkg/FinancialInstrument/man/CompareInstrumentFiles.Rd 2012-07-09 14:59:51 UTC (rev 1102)
+++ pkg/FinancialInstrument/man/CompareInstrumentFiles.Rd 2012-07-09 15:08:11 UTC (rev 1103)
@@ -5,12 +5,12 @@
CompareInstrumentFiles(file1, file2, ...)
}
\arguments{
- \item{file1}{file containing an instrument environment}
+ \item{file1}{A file containing an instrument environment}
- \item{file2}{another file containing an instrument
+ \item{file2}{Another file containing an instrument
environment}
- \item{...}{arguments to pass to
+ \item{...}{Arguments to pass to
\code{\link{all.equal.instrument}}}
}
\value{
@@ -23,14 +23,17 @@
Compare the .instrument environments of two files
}
\details{
- This will load 2 instrument files (created by
+ This will load two instrument files (created by
\code{\link{saveInstruments}}) and find the differences
- between them. It will produce messages indicating the
- number of instruments that were added, the number of
- instruments that were removed, and the number of
- instruments that are different
+ between them. In addition to returning a list of
+ difference that are found, it will produce messages
+ indicating the number of instruments that were added, the
+ number of instruments that were removed, and the number
+ of instruments that are different.
}
\examples{
+\dontrun{
+#backup current .instrument environment
bak <- as.list(FinancialInstrument:::.instrument, all.names=TRUE)
old.wd <- getwd()
tmpdir <- tempdir()
@@ -49,6 +52,7 @@
setwd(old.wd)
reloadInstruments(bak)
}
+}
\author{
Garrett See
}
More information about the Blotter-commits
mailing list