Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -41,9 +41,13 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
extra-packages: |
any::rcmdcheck
ggraph=?ignore-before-r=4.5.0
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
env:
_R_CHECK_FORCE_SUGGESTS_: false
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -39,7 +39,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@4.1.4
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: false
branch: gh-pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ VignetteBuilder:
Encoding: UTF-8
LazyData: TRUE
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1
RoxygenNote: 7.3.3
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# widyr (development version)

* Now force evaluation for `widely()` function factory (thanks to @lhdjung, #44)
* Explain how to handle zero-similarity pairs in `pairwise_similarity()` (#47)

# widyr 0.1.5

Expand Down
6 changes: 6 additions & 0 deletions R/pairwise_similarity.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
#'
#' Compute cosine similarity of all pairs of items in a tidy table.
#'
#' @details
#' This function uses sparse matrices internally for efficiency, which means
#' pairs with zero similarity are excluded from the output. To include
#' zero-similarity pairs, use [tidyr::complete()] on your result:
#' `complete(item1, item2, fill = list(similarity = 0))`.
#'
#' @param tbl Table
#' @param item Item to compare; will end up in `item1` and
#' `item2` columns
Expand Down
6 changes: 6 additions & 0 deletions man/pairwise_similarity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.