[Blotter-commits] r554 - in pkg/RTAQ: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 11 15:42:02 CET 2011


Author: jonathan
Date: 2011-02-11 15:42:02 +0100 (Fri, 11 Feb 2011)
New Revision: 554

Modified:
   pkg/RTAQ/R/convert_to_RData.R
   pkg/RTAQ/man/convert.Rd
Log:
making the default options for convert function work on WRDS data output, thx to Thomas Kirschenmann..

Modified: pkg/RTAQ/R/convert_to_RData.R
===================================================================
--- pkg/RTAQ/R/convert_to_RData.R	2011-02-10 20:42:58 UTC (rev 553)
+++ pkg/RTAQ/R/convert_to_RData.R	2011-02-11 14:42:02 UTC (rev 554)
@@ -29,7 +29,7 @@
 }
 
 ############################
-convert = function(from,to,datasource,datadestination,trades=TRUE,quotes=TRUE,ticker,dir=FALSE,extention="txt",header=FALSE,tradecolnames=NULL,quotecolnames=NULL,format="%m/%d/%Y %H:%M:%S"){
+convert = function(from,to,datasource,datadestination,trades=TRUE,quotes=TRUE,ticker,dir=FALSE,extention="txt",header=FALSE,tradecolnames=NULL,quotecolnames=NULL,format="%Y%M%D %H:%M:%S"){
   dates = timeSequence(from,to, format = "%Y-%m-%d", FinCenter = "GMT")
   dates = dates[isBizday(dates, holidays = holidayNYSE(2004:2010))];
   missingt=missingq=matrix(ncol=2,nrow=0);
@@ -51,7 +51,7 @@
 }
 
 convert_trades = function (datasource, datadestination, ticker, extention = "txt", 
-    header = FALSE, tradecolnames = NULL, format = "%m/%d/%Y %H:%M:%S") 
+    header = FALSE, tradecolnames = NULL, format = "%Y%M%D %H:%M:%S") 
 {  
     missingt=matrix(ncol=2,nrow=0);
    
@@ -112,7 +112,7 @@
 
 
 convert_quotes = function (datasource, datadestination, ticker, extention = "txt", 
-    header = FALSE, quotecolnames = NULL, format = "%m/%d/%Y %H:%M:%S") 
+    header = FALSE, quotecolnames = NULL, format = "%Y%M%D %H:%M:%S") 
 {
     missingq=matrix(ncol=2,nrow=0);
     

Modified: pkg/RTAQ/man/convert.Rd
===================================================================
--- pkg/RTAQ/man/convert.Rd	2011-02-10 20:42:58 UTC (rev 553)
+++ pkg/RTAQ/man/convert.Rd	2011-02-11 14:42:02 UTC (rev 554)
@@ -15,7 +15,7 @@
 convert(from,to,datasource,datadestination,trades=TRUE,quotes=TRUE,
         ticker,dir=FALSE,extention="txt",header=FALSE,
         tradecolnames=NULL,quotecolnames=NULL,
-        format="\%m/\%d/\%Y \%H:\%M:\%S")
+        format="%Y%M%D %H:%M:%S")
 }
 
 \arguments{
@@ -34,7 +34,7 @@
 \item{quotecolnames}{ vector containing column names of your quote data. By default, 
 the standard NYSE data format is taken, see pdf documentation for more details.}
 \item{format}{ character, indicates in what format TIME and DATE are recorded in the original data.
-By default, "\%m/\%d/\%Y \%H:\%M:\%S" is taken, which means the date is denoted by e.g. "01/30/2008" and the time by e.g. "09:30:00".}
+By default, "%Y%M%D %H:%M:%S" is taken, which means the date is denoted by e.g. "20080130" and the time by e.g. "09:30:00".}
 }
 
 \value{For each day an xts object is saved into the folder of that date, containing the converted data.



More information about the Blotter-commits mailing list