Skip to content
New issue

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

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

Already on GitHub? # to your account

semi_join renaming handler causes error #122

Closed
mitchelloharawild opened this issue May 31, 2019 · 0 comments
Closed

semi_join renaming handler causes error #122

mitchelloharawild opened this issue May 31, 2019 · 0 comments

Comments

@mitchelloharawild
Copy link
Member

semi_join never uses suffixes, and so tsibble:::rename_join_tsibble is not appropriate for this case.

library(tsibble)
library(tidyverse)
pedestrian %>% 
  semi_join(
    tibble(Sensor = "Birrarung Marr", Date_Time = Sys.time()),
    by = "Sensor"
  )
#> Error in eval_tidy(enquo(var), var_env): object 'Date_Time.x' not found

as_tibble(pedestrian) %>% 
  semi_join(
    tibble(Sensor = "Birrarung Marr", Date_Time = Sys.time()),
    by = "Sensor"
  )
#> # A tibble: 14,566 x 5
#>    Sensor         Date_Time           Date        Time Count
#>    <chr>          <dttm>              <date>     <int> <int>
#>  1 Birrarung Marr 2015-01-01 00:00:00 2015-01-01     0  1630
#>  2 Birrarung Marr 2015-01-01 01:00:00 2015-01-01     1   826
#>  3 Birrarung Marr 2015-01-01 02:00:00 2015-01-01     2   567
#>  4 Birrarung Marr 2015-01-01 03:00:00 2015-01-01     3   264
#>  5 Birrarung Marr 2015-01-01 04:00:00 2015-01-01     4   139
#>  6 Birrarung Marr 2015-01-01 05:00:00 2015-01-01     5    77
#>  7 Birrarung Marr 2015-01-01 06:00:00 2015-01-01     6    44
#>  8 Birrarung Marr 2015-01-01 07:00:00 2015-01-01     7    56
#>  9 Birrarung Marr 2015-01-01 08:00:00 2015-01-01     8   113
#> 10 Birrarung Marr 2015-01-01 09:00:00 2015-01-01     9   166
#> # … with 14,556 more rows

Created on 2019-05-31 by the reprex package (v0.2.1)

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

No branches or pull requests

1 participant