-
Notifications
You must be signed in to change notification settings - Fork 31
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
Automatically select() key variables in a mable #170
Comments
I'm not sure if key variables should be automatically included in the I think it is best for |
|
If a key is no longer necessary to uniquely identify a time series, it can be removed with library(tsibble)
library(dplyr)
tourism %>%
filter(Purpose == "Holiday") %>%
select(-Purpose)
#> # A tsibble: 6,080 x 4 [1Q]
#> # Key: Region, State [76]
#> Quarter Region State Trips
#> <qtr> <chr> <chr> <dbl>
#> 1 1998 Q1 Adelaide South Australia 224.
#> 2 1998 Q2 Adelaide South Australia 130.
#> 3 1998 Q3 Adelaide South Australia 156.
#> 4 1998 Q4 Adelaide South Australia 182.
#> 5 1999 Q1 Adelaide South Australia 185.
#> 6 1999 Q2 Adelaide South Australia 135.
#> 7 1999 Q3 Adelaide South Australia 136.
#> 8 1999 Q4 Adelaide South Australia 169.
#> 9 2000 Q1 Adelaide South Australia 184.
#> 10 2000 Q2 Adelaide South Australia 134.
#> # … with 6,070 more rows Created on 2020-03-07 by the reprex package (v0.3.0) Fundamentally, the same could be said for mables, however I expect redundant keys would be less common. |
Yeah, what I mean is, if a tsibble has a key, then I can understand selecting both key and index, and not selecting both key and index. But selecting index and not selecting key seems weird. |
@earowang can comment on this. |
|
Consolidated into #192 |
This is somewhat related to #167. Rather than deleting a model, is there a good way to select only a specified model in a mable? Doing
select(mable, mod)
results inThe text was updated successfully, but these errors were encountered: