We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi , I think this picture is wrong. https://r4ds.hadley.nz/joins#fig-join-closest this is example code:
library(dplyr) # 示例数据 df1 <- tibble( time1 = c(1, 2, 3), value1 = c("A", "B", "C") ) df2 <- tibble( time2 = c(1, 2, 4), value2 = c("X", "Y", "Z") ) df1 %>% left_join(df2, by = join_by(closest(time1 <= time2)))
result is
# A tibble: 3 × 4 time1 value1 time2 value2 <dbl> <chr> <dbl> <chr> 1 1 A 1 X 2 2 B 2 Y 3 3 C 4 Z
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi , I think this picture is wrong.
https://r4ds.hadley.nz/joins#fig-join-closest
this is example code:
result is
The text was updated successfully, but these errors were encountered: