Skip to contents

transform_to_tsibble() is a Transform function that edits an object in such a way that core object attributes - e.g. shape, dimensions, elements, type - are altered. Specifically, this function implements an algorithm to transform to tsibble. The function returns Data (a tsibble).

Usage

transform_to_tsibble(
  data_tb,
  date_tfmn_fn = identity,
  focused_args_ls = NULL,
  focused_fn = NULL,
  index_1L_chr = "Date",
  key_vars_chr = character(0),
  metrics_chr = make_metric_vars(),
  temporal_vars_chr = make_temporal_vars(),
  type_1L_chr = c("main", "focused")
)

Arguments

data_tb

Data (a tibble)

date_tfmn_fn

Date transformation (a function), Default: identity

focused_args_ls

Focused arguments (a list), Default: NULL

focused_fn

Focused (a function), Default: NULL

index_1L_chr

Index (a character vector of length one), Default: 'Date'

key_vars_chr

Key variables (a character vector), Default: character(0)

metrics_chr

Metrics (a character vector), Default: make_metric_vars()

temporal_vars_chr

Temporal variables (a character vector), Default: make_temporal_vars()

type_1L_chr

Type (a character vector of length one), Default: c("main", "focused")

Value

Data (a tsibble)