Skip to content

Commit

Permalink
No more distinct_(), namespace for filter
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Sep 12, 2022
1 parent f6b1467 commit 0362e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/pairwise_count.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pairwise_count_ <- function(tbl, item, feature, wt = NULL, ...) {
}

tbl %>%
distinct_(.dots = c(item, feature), .keep_all = TRUE) %>%
distinct(.data[[item]], .data[[feature]], .keep_all = TRUE) %>%
mutate(..value = 1) %>%
func(item, feature, wt) %>%
rename(n = value)
Expand Down
4 changes: 2 additions & 2 deletions R/squarely.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ squarely_ <- function(.f, diag = FALSE,
ret$item2 <- as.integer(ret$item2)

if (!upper) {
ret <- filter(ret, item1 <= item2)
ret <- dplyr::filter(ret, item1 <= item2)
}
if (!diag) {
ret <- filter(ret, item1 != item2)
ret <- dplyr::filter(ret, item1 != item2)
}

ret$item1 <- item_u[ret$item1]
Expand Down

0 comments on commit 0362e95

Please sign in to comment.