Learn R Programming

RITCH (version 0.1.26)

add_meta_to_filename: Adds meta information (date and exchange) to an itch filename

Description

Note that if date and exchange information are already present, they are overwritten

Usage

add_meta_to_filename(file, date, exchange)

Value

the filename with exchanged or added date and exchange information

Arguments

file

the filename

date

the date as a date-class or as a string that is understood by base::as.Date().

exchange

the name of the exchange

Examples

Run this code
add_meta_to_filename("03302017.NASDAQ_ITCH50", "2010-12-24", "TEST")
add_meta_to_filename("20170130.BX_ITCH_50.gz", "2010-12-24", "TEST")
add_meta_to_filename("S030220-v50-bx.txt.gz", "2010-12-24", "TEST")
add_meta_to_filename("unknown_file.ITCH_50", "2010-12-24", "TEST")

Run the code above in your browser using DataLab