Search code examples
rforecasting

Tsibble is being changed to tibble FPP3


I am working through Rob Hyndman's FPP3. I am on section 2.5 and there is an example about Australian holiday tourism. Here is the example with output:

holidays <- tourism %>%
  filter(Purpose == "Holiday") %>%
  group_by(State) %>%
  summarise(Trips = sum(Trips))

holidays

#> # A tsibble: 640 x 3 [1Q]
#> # Key:       State [8]
#>    State Quarter Trips
#>    <chr>   <qtr> <dbl>
#>  1 ACT   1998 Q1  196.
#>  2 ACT   1998 Q2  127.
#>  3 ACT   1998 Q3  111.
#>  4 ACT   1998 Q4  170.
#>  5 ACT   1999 Q1  108.
#>  6 ACT   1999 Q2  125.
#>  7 ACT   1999 Q3  178.
#>  8 ACT   1999 Q4  218.
#>  9 ACT   2000 Q1  158.
#> 10 ACT   2000 Q2  155.
#> # … with 630 more rows

However, when I use the same code I get the following output:

> holidays
# A tibble: 8 x 2
  State                Trips
  <chr>                <dbl>
1 ACT                 12089.
2 New South Wales    238741.
3 Northern Territory  14917.
4 Queensland         170787.
5 South Australia     52887.
6 Tasmania            31229.
7 Victoria           179228.
8 Western Australia   63349.

As you can see, the tsibble has been changed to a tibble. When I run everything but the summarise function, I still get a tsibble. I am thinking that perhaps the summarise function is somehow changing the type to tibble. Any help would be appreciated. Thanks!


Solution

  • I uninstalled and reinstalled the tsibble package. I noticed that my original version was 0.8.6 but after installation I now have 0.9.0. After I did that it fixed the issue. Thanks!