create_start_event: Create a start event column.

View source: R/utils.R

create_start_eventR Documentation

Create a start event column.

Description

[Superseded]

This function is from the superseded package tidymv. Please, use the tidygam package instead.

Create a new column which marks the beginning of each series in a tibble (for example, time series).

Usage

create_start_event(tibble, series_col)

Arguments

tibble

A tibble arranged according to the series.

series_col

The name of the column that defines the group of series, as an unquoted expression.

Value

A tibble with an extra column that marks the beginning of the series.

Examples

library(dplyr)
series_tbl <- tibble(
  time_series = rep(1:5, 3),
  group = rep(c("a", "b", "c"), each = 5)
) %>%
  create_start_event(group)


stefanocoretta/tidymv documentation built on May 12, 2023, 1:57 p.m.