When a data frame is passed to as_tsibble() with a column named index the object conversion fails.
Consider the following example, where the grouping variable is stored as "index", the time variable stored as "qtr", and the time series value named "value".
tbl2 <- tibble(
qtr = rep(yearquarter("2010 Q1") + 0:9, 3),
index = rep(c("x", "y", "z"), each = 10),
value = rnorm(30)
)
as_tsibble(tbl2, key = index, index = qtr)
Results:
Error in `validate_index()`:
! Unsupported index type: character
Eliminating naming conflicts with specials fixes the error.
Details
When a data frame is passed to as_tsibble() with a column named index the object conversion fails.
Consider the following example, where the grouping variable is stored as "index", the time variable stored as "qtr", and the time series value named "value".
Results:
Eliminating naming conflicts with specials fixes the error.