Skip to contents

This function will take in a data set and return to you a tibble of useful information.

Usage

ts_info_tbl(.data, .date_col)

Arguments

.data

The data you are passing to the function

.date_col

This is only needed if you are passing a tibble.

Value

A tibble

Details

This function can accept objects of the following classes:

  • ts

  • xts

  • mts

  • zoo

  • tibble/data.frame

The function will return the following pieces of information in a tibble:

  • name

  • class

  • frequency

  • start

  • end

  • var

  • length

Author

Steven P. Sanderson II, MPH

Examples

ts_info_tbl(AirPassengers)
#> # A tibble: 1 × 7
#>   name          class frequency start  end     var        length
#>   <chr>         <chr>     <dbl> <chr>  <chr>   <chr>       <int>
#> 1 AirPassengers ts           12 1949 1 1960 12 univariate    144
ts_info_tbl(BJsales)
#> # A tibble: 1 × 7
#>   name    class frequency start end   var        length
#>   <chr>   <chr>     <dbl> <chr> <chr> <chr>       <int>
#> 1 BJsales ts            1 1 1   150 1 univariate    150