From bfce0ef69f4db3d5bf4cd7074fba3ccef546d2d0 Mon Sep 17 00:00:00 2001 From: David Robinson Date: Thu, 19 Feb 2026 12:36:37 -0500 Subject: [PATCH 1/2] Fixes for CRAN resubmission --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ R/geo_join.R | 1 - README.Rmd | 6 +++--- README.md | 6 +++--- cran-comments.md | 26 ++++++++++++++++++++------ man/geo_join.Rd | 1 - 7 files changed, 31 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f80299a..3c72112 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: fuzzyjoin Type: Package Title: Join Tables Together on Inexact Matching -Version: 0.1.7 +Version: 0.1.8 Authors@R: c(person("David", "Robinson", email = "admiral.david@gmail.com", role = c("aut", "cre")), person("Jennifer", "Bryan", email = "jenny@rstudio.com", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index 6f33df4..e9e5bbd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# fuzzyjoin 0.1.8 + +* Updated README links to remove stale redirects and a dead external URL that triggered CRAN URL check notes. + # fuzzyjoin 0.1.7 * fixing documentation to keep it on CRAN. diff --git a/R/geo_join.R b/R/geo_join.R index 9ce3d0c..f2fabb8 100644 --- a/R/geo_join.R +++ b/R/geo_join.R @@ -54,7 +54,6 @@ #' ggplot(pairs, aes(x = longitude.x, y = latitude.x, #' xend = longitude.y, yend = latitude.y)) + #' geom_segment(color = "red") + -#' annotation_borders("state") + #' theme_void() #' #' # also get distances diff --git a/README.Rmd b/README.Rmd index 9dc3e71..3c3d213 100644 --- a/README.Rmd +++ b/README.Rmd @@ -16,15 +16,15 @@ fuzzyjoin: Join data frames on inexact matching ------------------ [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/fuzzyjoin)](https://cran.r-project.org/package=fuzzyjoin) -[![Travis-CI Build Status](https://travis-ci.org/dgrtwo/fuzzyjoin.svg?branch=master)](https://travis-ci.org/dgrtwo/fuzzyjoin) +[![Travis-CI Build Status](https://api.travis-ci.com/dgrtwo/fuzzyjoin.svg?branch=master)](https://app.travis-ci.com/dgrtwo/fuzzyjoin) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/dgrtwo/fuzzyjoin?branch=master&svg=true)](https://ci.appveyor.com/project/dgrtwo/fuzzyjoin) -[![Coverage Status](https://img.shields.io/codecov/c/github/dgrtwo/fuzzyjoin/master.svg)](https://codecov.io/github/dgrtwo/fuzzyjoin?branch=master) +[![Coverage Status](https://img.shields.io/codecov/c/github/dgrtwo/fuzzyjoin/master.svg)](https://app.codecov.io/github/dgrtwo/fuzzyjoin?branch=master) The fuzzyjoin package is a variation on dplyr's join operations that allows matching not just on values that match between columns, but on inexact matching. This allows matching on: * Numeric values that are within some tolerance (`difference_inner_join`) -* Strings that are similar in Levenshtein/cosine/Jaccard distance, or [other metrics](http://finzi.psych.upenn.edu/library/stringdist/html/stringdist-metrics.html) from the [stringdist](https://cran.r-project.org/package=stringdist) package (`stringdist_inner_join`) +* Strings that are similar in Levenshtein/cosine/Jaccard distance, or other metrics from the [stringdist](https://cran.r-project.org/package=stringdist) package (`stringdist_inner_join`) * A regular expression in one column matching to another (`regex_inner_join`) * Euclidean or Manhattan distance across multiple columns (`distance_inner_join`) * Geographic distance based on longitude and latitude (`geo_inner_join`) diff --git a/README.md b/README.md index a475ea8..a5c7e5e 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,15 @@ fuzzyjoin: Join data frames on inexact matching ------------------ [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/fuzzyjoin)](https://cran.r-project.org/package=fuzzyjoin) -[![Travis-CI Build Status](https://travis-ci.org/dgrtwo/fuzzyjoin.svg?branch=master)](https://travis-ci.org/dgrtwo/fuzzyjoin) +[![Travis-CI Build Status](https://api.travis-ci.com/dgrtwo/fuzzyjoin.svg?branch=master)](https://app.travis-ci.com/dgrtwo/fuzzyjoin) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/dgrtwo/fuzzyjoin?branch=master&svg=true)](https://ci.appveyor.com/project/dgrtwo/fuzzyjoin) -[![Coverage Status](https://img.shields.io/codecov/c/github/dgrtwo/fuzzyjoin/master.svg)](https://codecov.io/github/dgrtwo/fuzzyjoin?branch=master) +[![Coverage Status](https://img.shields.io/codecov/c/github/dgrtwo/fuzzyjoin/master.svg)](https://app.codecov.io/github/dgrtwo/fuzzyjoin?branch=master) The fuzzyjoin package is a variation on dplyr's join operations that allows matching not just on values that match between columns, but on inexact matching. This allows matching on: * Numeric values that are within some tolerance (`difference_inner_join`) -* Strings that are similar in Levenshtein/cosine/Jaccard distance, or [other metrics](http://finzi.psych.upenn.edu/library/stringdist/html/stringdist-metrics.html) from the [stringdist](https://cran.r-project.org/package=stringdist) package (`stringdist_inner_join`) +* Strings that are similar in Levenshtein/cosine/Jaccard distance, or other metrics from the [stringdist](https://cran.r-project.org/package=stringdist) package (`stringdist_inner_join`) * A regular expression in one column matching to another (`regex_inner_join`) * Euclidean or Manhattan distance across multiple columns (`distance_inner_join`) * Geographic distance based on longitude and latitude (`geo_inner_join`) diff --git a/cran-comments.md b/cran-comments.md index 802b85a..9fab554 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,12 +1,26 @@ -# fuzzyjoin 0.1.6 +# fuzzyjoin 0.1.8 -This release makes fuzzyjoin compatible with dplyr v1.0.0, which is planned to be submitted to CRAN on 2020-05-15. +Resubmission after archival. -## Bug fixes and maintenance +This release addresses CRAN URL check issues in the README: -* Updates to internals to make compatible with dplyr 1.0.0 (#67, @hadley) -* Rebuilt site with pkgdown +* Updated stale redirected URLs (Codecov and Travis). +* Removed a dead external link. +* Updated one example that used a no-longer-available ggplot2 helper. ## R CMD check results -There were no ERRORs, WARNINGs or NOTEs. +### Local (macOS) + +`R CMD check --as-cran fuzzyjoin_0.1.8.tar.gz` + +* 0 ERRORs | 0 WARNINGs | 2 NOTEs +* Notes: + * New submission / package archived on CRAN + * unable to verify current time + +### Win-builder (R-devel) + +* 0 ERRORs | 0 WARNINGs | 1 NOTE +* NOTE: "Package was archived on CRAN" +* Log: https://win-builder.r-project.org/kSocccxGdXNv/00check.log diff --git a/man/geo_join.Rd b/man/geo_join.Rd index 59bd4d6..57cf0f3 100644 --- a/man/geo_join.Rd +++ b/man/geo_join.Rd @@ -146,7 +146,6 @@ library(ggplot2) ggplot(pairs, aes(x = longitude.x, y = latitude.x, xend = longitude.y, yend = latitude.y)) + geom_segment(color = "red") + - annotation_borders("state") + theme_void() # also get distances From f17a3e6c730c4a6fb07830598ce0dd0d7515fcaf Mon Sep 17 00:00:00 2001 From: David Robinson Date: Thu, 19 Feb 2026 16:37:04 -0500 Subject: [PATCH 2/2] Fixes to noSuggests --- R/geo_join.R | 11 ++++++----- R/regex_join.R | 23 +++++++++++------------ R/stringdist_join.R | 23 ++++++++++++----------- man/geo_join.Rd | 11 ++++++----- man/regex_join.Rd | 23 +++++++++++------------ man/stringdist_join.Rd | 23 ++++++++++++----------- tests/testthat/test_regex_join.R | 4 ++-- tests/testthat/test_stringdist_join.R | 7 ++++++- 8 files changed, 66 insertions(+), 59 deletions(-) diff --git a/R/geo_join.R b/R/geo_join.R index f2fabb8..26b0394 100644 --- a/R/geo_join.R +++ b/R/geo_join.R @@ -50,11 +50,12 @@ #' pairs #' #' # plot them -#' library(ggplot2) -#' ggplot(pairs, aes(x = longitude.x, y = latitude.x, -#' xend = longitude.y, yend = latitude.y)) + -#' geom_segment(color = "red") + -#' theme_void() +#' if (requireNamespace("ggplot2", quietly = TRUE)) { +#' ggplot2::ggplot(pairs, ggplot2::aes(x = longitude.x, y = latitude.x, +#' xend = longitude.y, yend = latitude.y)) + +#' ggplot2::geom_segment(color = "red") + +#' ggplot2::theme_void() +#' } #' #' # also get distances #' s1 %>% diff --git a/R/regex_join.R b/R/regex_join.R index afcddc0..a6087a5 100644 --- a/R/regex_join.R +++ b/R/regex_join.R @@ -15,21 +15,20 @@ #' @examples #' #' library(dplyr) -#' library(ggplot2) -#' data(diamonds) +#' if (requireNamespace("ggplot2", quietly = TRUE)) { +#' diamonds <- tibble::as_tibble(ggplot2::diamonds) #' -#' diamonds <- tibble::as_tibble(diamonds) +#' d <- tibble::tibble(regex_name = c("^Idea", "mium", "Good"), +#' type = 1:3) #' -#' d <- tibble::tibble(regex_name = c("^Idea", "mium", "Good"), -#' type = 1:3) +#' # When they are inner_joined, only Good<->Good matches +#' diamonds %>% +#' inner_join(d, by = c(cut = "regex_name")) #' -#' # When they are inner_joined, only Good<->Good matches -#' diamonds %>% -#' inner_join(d, by = c(cut = "regex_name")) -#' -#' # but we can regex match them -#' diamonds %>% -#' regex_inner_join(d, by = c(cut = "regex_name")) +#' # but we can regex match them +#' diamonds %>% +#' regex_inner_join(d, by = c(cut = "regex_name")) +#' } #' #' @export regex_join <- function(x, y, by = NULL, mode = "inner", ignore_case = FALSE) { diff --git a/R/stringdist_join.R b/R/stringdist_join.R index b216279..a1f5749 100644 --- a/R/stringdist_join.R +++ b/R/stringdist_join.R @@ -22,20 +22,21 @@ #' @examples #' #' library(dplyr) -#' library(ggplot2) -#' data(diamonds) +#' if (requireNamespace("ggplot2", quietly = TRUE)) { +#' diamonds <- tibble::as_tibble(ggplot2::diamonds) #' -#' d <- tibble::tibble(approximate_name = c("Idea", "Premiums", "Premioom", -#' "VeryGood", "VeryGood", "Faiir"), -#' type = 1:6) +#' d <- tibble::tibble(approximate_name = c("Idea", "Premiums", "Premioom", +#' "VeryGood", "VeryGood", "Faiir"), +#' type = 1:6) #' -#' # no matches when they are inner-joined: -#' diamonds %>% -#' inner_join(d, by = c(cut = "approximate_name")) +#' # no matches when they are inner-joined: +#' diamonds %>% +#' inner_join(d, by = c(cut = "approximate_name")) #' -#' # but we can match when they're fuzzy joined -#' diamonds %>% -#' stringdist_inner_join(d, by = c(cut = "approximate_name")) +#' # but we can match when they're fuzzy joined +#' diamonds %>% +#' stringdist_inner_join(d, by = c(cut = "approximate_name")) +#' } #' #' @export stringdist_join <- function(x, y, by = NULL, max_dist = 2, diff --git a/man/geo_join.Rd b/man/geo_join.Rd index 57cf0f3..c7dee73 100644 --- a/man/geo_join.Rd +++ b/man/geo_join.Rd @@ -142,11 +142,12 @@ pairs <- s1 \%>\% pairs # plot them -library(ggplot2) -ggplot(pairs, aes(x = longitude.x, y = latitude.x, - xend = longitude.y, yend = latitude.y)) + - geom_segment(color = "red") + - theme_void() +if (requireNamespace("ggplot2", quietly = TRUE)) { + ggplot2::ggplot(pairs, ggplot2::aes(x = longitude.x, y = latitude.x, + xend = longitude.y, yend = latitude.y)) + + ggplot2::geom_segment(color = "red") + + ggplot2::theme_void() +} # also get distances s1 \%>\% diff --git a/man/regex_join.Rd b/man/regex_join.Rd index c209de7..202c983 100644 --- a/man/regex_join.Rd +++ b/man/regex_join.Rd @@ -43,21 +43,20 @@ table \examples{ library(dplyr) -library(ggplot2) -data(diamonds) +if (requireNamespace("ggplot2", quietly = TRUE)) { + diamonds <- tibble::as_tibble(ggplot2::diamonds) -diamonds <- tibble::as_tibble(diamonds) + d <- tibble::tibble(regex_name = c("^Idea", "mium", "Good"), + type = 1:3) -d <- tibble::tibble(regex_name = c("^Idea", "mium", "Good"), - type = 1:3) + # When they are inner_joined, only Good<->Good matches + diamonds \%>\% + inner_join(d, by = c(cut = "regex_name")) -# When they are inner_joined, only Good<->Good matches -diamonds \%>\% - inner_join(d, by = c(cut = "regex_name")) - -# but we can regex match them -diamonds \%>\% - regex_inner_join(d, by = c(cut = "regex_name")) + # but we can regex match them + diamonds \%>\% + regex_inner_join(d, by = c(cut = "regex_name")) +} } \seealso{ diff --git a/man/stringdist_join.Rd b/man/stringdist_join.Rd index 9f7c195..89281e3 100644 --- a/man/stringdist_join.Rd +++ b/man/stringdist_join.Rd @@ -68,19 +68,20 @@ If \code{method = "soundex"}, the \code{max_dist} is automatically \examples{ library(dplyr) -library(ggplot2) -data(diamonds) +if (requireNamespace("ggplot2", quietly = TRUE)) { + diamonds <- tibble::as_tibble(ggplot2::diamonds) -d <- tibble::tibble(approximate_name = c("Idea", "Premiums", "Premioom", - "VeryGood", "VeryGood", "Faiir"), - type = 1:6) + d <- tibble::tibble(approximate_name = c("Idea", "Premiums", "Premioom", + "VeryGood", "VeryGood", "Faiir"), + type = 1:6) -# no matches when they are inner-joined: -diamonds \%>\% - inner_join(d, by = c(cut = "approximate_name")) + # no matches when they are inner-joined: + diamonds \%>\% + inner_join(d, by = c(cut = "approximate_name")) -# but we can match when they're fuzzy joined -diamonds \%>\% - stringdist_inner_join(d, by = c(cut = "approximate_name")) + # but we can match when they're fuzzy joined + diamonds \%>\% + stringdist_inner_join(d, by = c(cut = "approximate_name")) +} } diff --git a/tests/testthat/test_regex_join.R b/tests/testthat/test_regex_join.R index 238551b..ac1c6b4 100644 --- a/tests/testthat/test_regex_join.R +++ b/tests/testthat/test_regex_join.R @@ -6,8 +6,8 @@ d <- tibble::tibble(cut_regex = c("^Idea", "emiu", dplyr::mutate(type = dplyr::row_number()) test_that("regex joins work", { - library(ggplot2) - data("diamonds") + testthat::skip_if_not_installed("ggplot2") + diamonds <- tibble::as_tibble(ggplot2::diamonds) j <- diamonds %>% regex_inner_join(d, by = c(cut = "cut_regex")) diff --git a/tests/testthat/test_stringdist_join.R b/tests/testthat/test_stringdist_join.R index ccd0152..7a6899c 100644 --- a/tests/testthat/test_stringdist_join.R +++ b/tests/testthat/test_stringdist_join.R @@ -6,6 +6,12 @@ d <- tibble::tibble( ) %>% dplyr::mutate(type = dplyr::row_number()) +if (!requireNamespace("ggplot2", quietly = TRUE)) { + testthat::skip("ggplot2 not installed") +} + +diamonds <- tibble::as_tibble(ggplot2::diamonds) + test_that("stringdist_inner_join works on a large df with multiples in each", { # create something with names close to the cut column in the diamonds dataset j <- stringdist_inner_join(diamonds, d, by = c(cut = "cut2"), distance_col = "distance") @@ -332,4 +338,3 @@ test_that("stringdist_ joins where there are no overlapping rows still get a dis result <- stringdist_anti_join(a, b, by = c(x = "y"), max_dist = 1, distance_col = "distance") expect_equal(a, result) }) -