as_tsymble: Construct a tsybble

View source: R/tsymble.R

as_tsymbleR Documentation

Construct a tsybble

Description

\lifecycle

experimental Constructs a tsymble. A tsibble with ticker symbol, and query metadata attributes.

Usage

as_tsymble(
  x,
  index,
  symbol = get_sym(x),
  query = get_query(x),
  validate = TRUE,
  ...
)

Arguments

x

Other objects to be coerced to a tsibble (tbl_ts).

index

(character) index column name

symbol

(character) Ticker symbol

query

(list) Query metadata

validate

TRUE suggests to verify that each key or each combination of key variables leads to unique time indices (i.e. a valid tsibble). If you are sure that it's a valid input, specify FALSE to skip the checks.

...

Arguments passed on to tsibble::build_tsibble

key

Variable(s) that uniquely determine time indices. NULL for empty key, and c() for multiple variables. It works with tidy selector (e.g. dplyr::starts_with()).

key_data

A data frame containing key variables and .rows. When a data frame is supplied, the argument key will be ignored.

index2

A candidate of index to update the index to a new one when index_by. By default, it's identical to index.

ordered

The default of NULL arranges the key variable(s) first and then index from past to future. TRUE suggests to skip the ordering as x in the correct order. FALSE checks the ordering and may give a warning.

interval

TRUE automatically calculates the interval, and FALSE for irregular interval. Use the specified interval via new_interval() as is.

.drop

If TRUE, empty key groups are dropped.


jagg19/AlpacaforR documentation built on July 3, 2023, 12:14 p.m.