[Blotter-commits] r78 - pkg/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 14 17:42:59 CET 2009


Author: edd
Date: 2009-03-14 17:42:59 +0100 (Sat, 14 Mar 2009)
New Revision: 78

Modified:
   pkg/tests/txnFee.R
   pkg/tests/txnFee.Rout.save
Log:
also set options("width") to force consistent print() output


Modified: pkg/tests/txnFee.R
===================================================================
--- pkg/tests/txnFee.R	2009-03-14 16:42:21 UTC (rev 77)
+++ pkg/tests/txnFee.R	2009-03-14 16:42:59 UTC (rev 78)
@@ -1,7 +1,8 @@
 
 suppressMessages(library(blotter))	# to suppress the TZ noise from xts
 library(quantmod)
-Sys.setenv(TZ="America/Chicago")
+Sys.setenv(TZ="America/Chicago")        # as the data set got save with this TZ
+options("width"=78)                     # to tie down the print() statement width
 verbose <- FALSE
 data(IBM)                               # data included in package
 symbols <- c("IBM")

Modified: pkg/tests/txnFee.Rout.save
===================================================================
--- pkg/tests/txnFee.Rout.save	2009-03-14 16:42:21 UTC (rev 77)
+++ pkg/tests/txnFee.Rout.save	2009-03-14 16:42:59 UTC (rev 78)
@@ -24,7 +24,8 @@
 Version 0.3-7, Revision 461
 http://www.quantmod.com
 
-> 
+> Sys.setenv(TZ="America/Chicago")        # as the data set got save with this TZ
+> options("width"=78)                     # to tie down the print() statement width
 > verbose <- FALSE
 > data(IBM)                               # data included in package
 > symbols <- c("IBM")
@@ -48,77 +49,77 @@
 > 
 > print(a1)
 $TOTAL
-                    Additions Withdrawals Txn.Fees Realized.PL Unrealized.PL
-1950-01-01 00:00:00         0           0        0           0             0
-2007-01-03 06:00:00         0           0        0           0             0
-2007-01-04 06:00:00         0           0        0           0          9831
-2007-01-05 06:00:00         0           0        0           0           -89
-2007-01-08 06:00:00         0           0        0           0           148
-2007-01-09 06:00:00         0           0        0           0           117
-2007-01-10 06:00:00         0           0        0           0          -118
-                    Int.Income Trading.PL Advisory.Fees Net.Performance End.Eq
-1950-01-01 00:00:00          0          0             0               0 100000
-2007-01-03 06:00:00          0          0             0               0 100000
-2007-01-04 06:00:00          0       9831             0            9831 109831
-2007-01-05 06:00:00          0        -89             0             -89 109742
-2007-01-08 06:00:00          0        148             0             148 109890
-2007-01-09 06:00:00          0        117             0             117 110007
-2007-01-10 06:00:00          0       -118             0            -118 109889
+           Additions Withdrawals Txn.Fees Realized.PL Unrealized.PL
+1950-01-01         0           0        0           0             0
+2007-01-03         0           0        0           0             0
+2007-01-04         0           0        5           0           186
+2007-01-05         0           0        0           0           -89
+2007-01-08         0           0        0           0           148
+2007-01-09         0           0        0           0           117
+2007-01-10         0           0        0           0          -118
+           Int.Income Trading.PL Advisory.Fees Net.Performance End.Eq
+1950-01-01          0          0             0               0 100000
+2007-01-03          0          0             0               0 100000
+2007-01-04          0        186             0             186 100186
+2007-01-05          0        -89             0             -89 100097
+2007-01-08          0        148             0             148 100245
+2007-01-09          0        117             0             117 100362
+2007-01-10          0       -118             0            -118 100244
 
 $p1
-                    Long.Value Short.Value Net.Value Gross.Value Txn.Fees
-1950-01-01 00:00:00          0           0         0           0        0
-2007-01-03 06:00:00          0           0         0           0        0
-2007-01-04 06:00:00       9831           0      9831        9831        0
-2007-01-05 06:00:00       9742           0      9742        9742        0
-2007-01-08 06:00:00       9890           0      9890        9890        0
-2007-01-09 06:00:00      10007           0     10007       10007        0
-2007-01-10 06:00:00       9889           0      9889        9889        0
-                    Realized.PL Unrealized.PL Trading.PL
-1950-01-01 00:00:00           0             0          0
-2007-01-03 06:00:00           0             0          0
-2007-01-04 06:00:00           0          9831       9831
-2007-01-05 06:00:00           0           -89        -89
-2007-01-08 06:00:00           0           148        148
-2007-01-09 06:00:00           0           117        117
-2007-01-10 06:00:00           0          -118       -118
+           Long.Value Short.Value Net.Value Gross.Value Txn.Fees Realized.PL
+1950-01-01          0           0         0           0        0           0
+2007-01-03          0           0         0           0        0           0
+2007-01-04       9831           0      9831        9831        5           0
+2007-01-05       9742           0      9742        9742        0           0
+2007-01-08       9890           0      9890        9890        0           0
+2007-01-09      10007           0     10007       10007        0           0
+2007-01-10       9889           0      9889        9889        0           0
+           Unrealized.PL Trading.PL
+1950-01-01             0          0
+2007-01-03             0          0
+2007-01-04           186        186
+2007-01-05           -89        -89
+2007-01-08           148        148
+2007-01-09           117        117
+2007-01-10          -118       -118
 
 > print(a2)
 $TOTAL
-                    Additions Withdrawals Txn.Fees Realized.PL Unrealized.PL
-1950-01-01 00:00:00         0           0        0           0             0
-2007-01-03 06:00:00         0           0        0           0             0
-2007-01-04 06:00:00         0           0        0           0          9831
-2007-01-05 06:00:00         0           0        0           0           -89
-2007-01-08 06:00:00         0           0        0           0           148
-2007-01-09 06:00:00         0           0        0           0           117
-2007-01-10 06:00:00         0           0        0           0          -118
-                    Int.Income Trading.PL Advisory.Fees Net.Performance End.Eq
-1950-01-01 00:00:00          0          0             0               0 100000
-2007-01-03 06:00:00          0          0             0               0 100000
-2007-01-04 06:00:00          0       9831             0            9831 109831
-2007-01-05 06:00:00          0        -89             0             -89 109742
-2007-01-08 06:00:00          0        148             0             148 109890
-2007-01-09 06:00:00          0        117             0             117 110007
-2007-01-10 06:00:00          0       -118             0            -118 109889
+           Additions Withdrawals Txn.Fees Realized.PL Unrealized.PL
+1950-01-01         0           0        0           0             0
+2007-01-03         0           0        0           0             0
+2007-01-04         0           0        5           0           186
+2007-01-05         0           0        0           0           -89
+2007-01-08         0           0        0           0           148
+2007-01-09         0           0        0           0           117
+2007-01-10         0           0        0           0          -118
+           Int.Income Trading.PL Advisory.Fees Net.Performance End.Eq
+1950-01-01          0          0             0               0 100000
+2007-01-03          0          0             0               0 100000
+2007-01-04          0        186             0             186 100186
+2007-01-05          0        -89             0             -89 100097
+2007-01-08          0        148             0             148 100245
+2007-01-09          0        117             0             117 100362
+2007-01-10          0       -118             0            -118 100244
 
 $p2
-                    Long.Value Short.Value Net.Value Gross.Value Txn.Fees
-1950-01-01 00:00:00          0           0         0           0        0
-2007-01-03 06:00:00          0           0         0           0        0
-2007-01-04 06:00:00       9831           0      9831        9831        0
-2007-01-05 06:00:00       9742           0      9742        9742        0
-2007-01-08 06:00:00       9890           0      9890        9890        0
-2007-01-09 06:00:00      10007           0     10007       10007        0
-2007-01-10 06:00:00       9889           0      9889        9889        0
-                    Realized.PL Unrealized.PL Trading.PL
-1950-01-01 00:00:00           0             0          0
-2007-01-03 06:00:00           0             0          0
-2007-01-04 06:00:00           0          9831       9831
-2007-01-05 06:00:00           0           -89        -89
-2007-01-08 06:00:00           0           148        148
-2007-01-09 06:00:00           0           117        117
-2007-01-10 06:00:00           0          -118       -118
+           Long.Value Short.Value Net.Value Gross.Value Txn.Fees Realized.PL
+1950-01-01          0           0         0           0        0           0
+2007-01-03          0           0         0           0        0           0
+2007-01-04       9831           0      9831        9831        5           0
+2007-01-05       9742           0      9742        9742        0           0
+2007-01-08       9890           0      9890        9890        0           0
+2007-01-09      10007           0     10007       10007        0           0
+2007-01-10       9889           0      9889        9889        0           0
+           Unrealized.PL Trading.PL
+1950-01-01             0          0
+2007-01-03             0          0
+2007-01-04           186        186
+2007-01-05           -89        -89
+2007-01-08           148        148
+2007-01-09           117        117
+2007-01-10          -118       -118
 
 > #print(all.equal(a1, a2))	## cannot be equal because of names(): p1 != p2
 > print(all.equal(p1, p2))



More information about the Blotter-commits mailing list