Skip to content

Comments

Fixes #194#223

Merged
earowang merged 2 commits intotidyverts:masterfrom
TylerGrantSmith:zero_index
Sep 29, 2020
Merged

Fixes #194#223
earowang merged 2 commits intotidyverts:masterfrom
TylerGrantSmith:zero_index

Conversation

@TylerGrantSmith
Copy link
Contributor

So, I think the source of this problem is in dplyr, (tidyverse/dplyr#5541), but here is a workaround. There is no need to order the tsibble if there are no rows, so skip the step that causes the crash.

library(tsibble)
grped_ped <- pedestrian %>% dplyr::group_by(Sensor)
grped_ped[0, ]
#> # A tsibble: 0 x 5 [?] <Australia/Melbourne>
#> # Key:       Sensor [0]
#> # Groups:    Sensor [?]
#> # ... with 5 variables: Sensor <chr>, Date_Time <dttm>, Date <date>,
#> #   Time <int>, Count <int>

Created on 2020-09-29 by the reprex package (v0.3.0)

@earowang earowang merged commit b1bb8e4 into tidyverts:master Sep 29, 2020
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 this pull request may close these issues.

2 participants