# Default Column Names

Source: `R/ts_default.R`
`ts_default.Rd`

In data frame objects (`data.frame`, `tibble`, `data.table`), tsbox automatically detects the time and the value column. This function changes the column names to the defaults (`time`, `value`), so that auto-detection can be avoided in future operations.

    ts_default(x)

## Arguments

x | ts-boxable time series, an object of class `ts`, `xts`, `zoo`, `data.frame`, `data.table`, `tbl`, `tbl_ts`, `tbl_time`, `tis`, `irts` or `timeSeries`.

## Value

a ts-boxable time series, with the same class as the input.

## Examples

    df <- ts_df(ts_c(mdeaths, fdeaths))
    # non-default colnames
    colnames(df) <- c("id", "date", "count")
    # switch back to default colnames
    head(ts_default(df))
    #> [time]: 'date' [value]: 'count' #>        id       time value
    #> 1 mdeaths 1974-01-01  2134
    #> 2 mdeaths 1974-02-01  1863
    #> 3 mdeaths 1974-03-01  1877
    #> 4 mdeaths 1974-04-01  1877
    #> 5 mdeaths 1974-05-01  1492
    #> 6 mdeaths 1974-06-01  1249