Before:
library(tidyverse)
library(tsibble)
tsibble(
a = parse_date('1/1/24', format = '%m/%d/%y'),
b = 1,
)
#> Using `a` as index variable.
#> # A tsibble: 1 x 2 [?]
#> a b
#> <date> <dbl>
#> 1 2024-01-01 1
After select(-a):
tsibble(
a = parse_date('1/1/24', format = '%m/%d/%y'),
b = 1,
) |>
select(-a)
#> Using `a` as index variable.
#> # A tsibble: 1 x 2 [?]
#> b a
#> <dbl> <date>
#> 1 1 2024-01-01
Created on 2024-03-18 with reprex v2.0.2
(See discussion at Behavior of select when trying to remove the index from a tsibble.)