Learn R Programming

healthyR (version 0.2.2)

ts_signature_tbl: Make a Time Enhanced Tibble

Description

Returns a tibble that adds the time series signature from the timetk::tk_augment_timeseries_signature() function. All added from a chosen date column defined by the .date_col parameter.

Usage

ts_signature_tbl(.data, .date_col, .pad_time = TRUE, ...)

Value

A tibble

Arguments

.data

The data that is being analyzed.

.date_col

The column that holds the date.

.pad_time

Boolean TRUE/FALSE. If TRUE then the timetk::pad_by_time() function is called and used on the data.frame before the modification. The default is TRUE.

...

Grouping variables to be used by dplyr::group_by() before using timetk::pad_by_time()

Author

Steven P. Sanderson II, MPH

Details

  • Supply data with a date column and this will add the year, month, week, week day and hour to the tibble. The original date column is kept.

  • Returns a time-series signature tibble.

  • You must know the data going into the function and if certain columns should be dropped or kept when using further functions

See Also

Other Data Table Functions: category_counts_tbl(), los_ra_index_summary_tbl(), named_item_list(), top_n_tbl(), ts_census_los_daily_tbl()

Examples

Run this code
library(timetk)

ts_signature_tbl(
  .data       = m4_daily
  , .date_col = date
  , .pad_time = TRUE
  , id
)

Run the code above in your browser using DataLab