Learn R Programming

tsibble (version 0.5.3)

is_tsibble: If the object is a tsibble

Description

If the object is a tsibble

Usage

is_tsibble(x)

is_grouped_ts(x)

Arguments

x

An object.

Value

TRUE if the object inherits from the tbl_ts class.

Examples

Run this code
# NOT RUN {
# A tibble is not a tsibble ----
tbl <- tibble(
  date = seq(as.Date("2017-10-01"), as.Date("2017-10-31"), by = 1),
  value = rnorm(31)
)
is_tsibble(tbl)

# A tsibble ----
tsbl <- as_tsibble(tbl, index = date)
is_tsibble(tsbl)
# }

Run the code above in your browser using DataLab