Help function to check arguments of df with one column.

one_column_check(df)

Arguments

df

data.frame, xts or data.table object

Value

data.table with 1 column: Datetime

Examples

data(spy) one_column_check(subset(spy, select = c("index")))
#> Datetime #> 1: 2018-01-02 15:34:00 #> 2: 2018-01-02 15:39:00 #> 3: 2018-01-02 15:44:00 #> 4: 2018-01-02 15:49:00 #> 5: 2018-01-02 15:54:00 #> --- #> 58016: 2020-12-31 21:39:00 #> 58017: 2020-12-31 21:44:00 #> 58018: 2020-12-31 21:49:00 #> 58019: 2020-12-31 21:54:00 #> 58020: 2020-12-31 21:59:00
if (FALSE) one_column_check(subset(spy, select = c("close")))