#In order for these examples to work, the folder datasource
#should contain two folders named 2008-01-02 and 2008-01-03.
#These folder contain the files with the trade data,
#which are named "AAPL_trades.txt" or "AA_trades.txt".
from="2008-01-02";
to = "2008-01-03";
## Not run: ------------------------------------
# datasource=datadestination="C:\data"
#
# ### txt files from NYSE:
#
# convert(from,to,datasource,datadestination,trades=TRUE,
# quotes=FALSE,ticker=c("AA","AAPL"),dir=FALSE,extension="txt",
# header=FALSE,tradecolnames=NULL,quotecolnames=NULL,
# format="%Y%m%d %H:%M:%S");
#
# #Now, the folder datadestination will contain two folders
# #named 2008-01-02 and 2008-01-03 containing
# #the files AAPL_trades.RData and AAPL_trades.RData containing the trades.
# #The data can now be loaded with the TAQLoad function.
#
# ########## Csv file from WRDS
# #Suppose the datasource folder contains one csv file from WRDS
# #with data on IBM for multiple days.
# #The file should be named "IBM_trades.csv" and can be easily converted into xts
# #and then saved in RData format by:
#
# convert(from=from, to=to, datasource=datasource, datadestination=datadestination,
# trades = T, quotes = T, ticker="IBM", dir = FALSE, extension = "csv",
# header = TRUE, tradecolnames = NULL, quotecolnames = NULL, format = format,
# onefile = TRUE )
#
# ####### ASC file from www.tickdata.com
# #Suppose the datasource folder contains asc files for trades and quotes
# #from "www.tickdata.com" for GLP.
# #The files "GLP_quotes.asc" and "GLP_trades.asc" should be saved in datasource folder.
#
# convert(from=from, to=to, datasource=datasource, datadestination=datadestination,
# trades = T, quotes = T, ticker="GLP", dir = TRUE, extension = "tickdatacom",
# header = TRUE, tradecolnames = NULL, quotecolnames = NULL, format = "<!-- %d/%m/%Y %H:%M:%OS", -->
# onefile = TRUE );
## ---------------------------------------------
Run the code above in your browser using DataLab