Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<tsibble>[i] column selection returns <tibble> when key variables are non-syntactic #305

Open
mitchelloharawild opened this issue Mar 2, 2024 · 0 comments · May be fixed by #306
Open

Comments

@mitchelloharawild
Copy link
Member

Issue identified from tidyverts/fabletools#350

MRE:

library(tsibble)
#> 
#> Attaching package: 'tsibble'
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, union
names(tourism)[2] <- "My Region"
tourism[1:5]
#> # A tibble: 24,320 x 5
#>    Quarter `My Region` State           Purpose  Trips
#>      <qtr> <chr>       <chr>           <chr>    <dbl>
#>  1 1998 Q1 Adelaide    South Australia Business  135.
#>  2 1998 Q2 Adelaide    South Australia Business  110.
#>  3 1998 Q3 Adelaide    South Australia Business  166.
#>  4 1998 Q4 Adelaide    South Australia Business  127.
#>  5 1999 Q1 Adelaide    South Australia Business  137.
#>  6 1999 Q2 Adelaide    South Australia Business  200.
#>  7 1999 Q3 Adelaide    South Australia Business  169.
#>  8 1999 Q4 Adelaide    South Australia Business  134.
#>  9 2000 Q1 Adelaide    South Australia Business  154.
#> 10 2000 Q2 Adelaide    South Australia Business  169.
#> # i 24,310 more rows
tsibble::tourism[1:5]
#> # A tsibble: 24,320 x 5 [1Q]
#> # Key:       Region, State, Purpose [304]
#>    Quarter Region   State           Purpose  Trips
#>      <qtr> <chr>    <chr>           <chr>    <dbl>
#>  1 1998 Q1 Adelaide South Australia Business  135.
#>  2 1998 Q2 Adelaide South Australia Business  110.
#>  3 1998 Q3 Adelaide South Australia Business  166.
#>  4 1998 Q4 Adelaide South Australia Business  127.
#>  5 1999 Q1 Adelaide South Australia Business  137.
#>  6 1999 Q2 Adelaide South Australia Business  200.
#>  7 1999 Q3 Adelaide South Australia Business  169.
#>  8 1999 Q4 Adelaide South Australia Business  134.
#>  9 2000 Q1 Adelaide South Australia Business  154.
#> 10 2000 Q2 Adelaide South Australia Business  169.
#> # i 24,310 more rows

Created on 2024-03-02 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant