Description Usage Arguments Details Value Examples
This function takes time in the format, "093000", to represent hours, minutes, and seconds. The value of the function returns an ITime object. After reformatting the time to "09:30:00", the function passes the unambiguous string to an as.ITime() function call.
1 | timemanip(x)
|
x |
a one column of a data.table containing a time in the format, "093000", to represent "09:30:00" hours, minutes, and seconds. |
This function is intended to be vectorized over a data.table object. See examples below.
An ITime object.
1 2 3 4 5 6 7 | datasample <- as.data.table(bboread('data-raw/XCBT_C_FUT_110110.TXT'))
datasample[, TradeTime .= timemanip(datasample[, 2, with=FALSE])]
datasample
datasample <- as.data.table(bboread('data-raw/XCBT_C_FUT_110110.TXT'))
datasample[, c("TradeDate", "TradeTime") := .(datemanip(datasample[, 1, with=FALSE]), timemanip(datasample[, 2, with=FALSE]))]
datasample
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.