Closed msberends closed 3 years ago
Hey thanks for the PR! Do you have a working example for this at all? I agree that this is a needed fix, I just want to add some tests as well so it doesn't somehow get reintroduced in the future.
Also, I updated master so in future PRs will refer you to the git commit standards for the project.
Yes, I ran into trouble using an anti join last week. I’ll look it up!
Here it is:
tbl1 <- data.frame(a = sample(rep(LETTERS[1:3], 10)),
stringsAsFactors = FALSE)
tbl2 <- data.frame(a = LETTERS[1:3],
b = colours()[1:3],
stringsAsFactors = FALSE)
class(poorman::semi_join(tbl1, tbl2))
#> [1] "character"
class(dplyr::semi_join(tbl1, tbl2))
#> [1] "data.frame"
You might want to check all of your code for
x[y, z]
andx[y, ]
cases, and replace them withx[y, z, drop = FALSE]
andx[y, , drop = FALSE]
to prevent that you will end up with a vector ifz
has length one.