{"id":15520868,"url":"https://github.com/samedwardes/safejoin","last_synced_at":"2026-01-28T02:06:14.092Z","repository":{"id":52199581,"uuid":"358927017","full_name":"SamEdwardes/safejoin","owner":"SamEdwardes","description":"Perform \"safe\" table joins in R.","archived":false,"fork":false,"pushed_at":"2024-10-12T21:02:44.000Z","size":143,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T22:23:14.096Z","etag":null,"topics":["data-base","data-science","r"],"latest_commit_sha":null,"homepage":"https://safejoin-r.netlify.app/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamEdwardes.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-17T16:22:25.000Z","updated_at":"2024-10-12T21:02:46.000Z","dependencies_parsed_at":"2025-03-05T07:41:47.783Z","dependency_job_id":null,"html_url":"https://github.com/SamEdwardes/safejoin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Fsafejoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Fsafejoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Fsafejoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamEdwardes%2Fsafejoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamEdwardes","download_url":"https://codeload.github.com/SamEdwardes/safejoin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372922,"owners_count":21419722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-base","data-science","r"],"created_at":"2024-10-02T10:29:54.928Z","updated_at":"2026-01-28T02:06:14.035Z","avatar_url":"https://github.com/SamEdwardes.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# safejoin\n\n\u003c!-- badges: start --\u003e\n\n[![R build status](https://github.com/SamEdwardes/safejoin/workflows/R-CMD-check/badge.svg)](https://github.com/SamEdwardes/safejoin/actions) [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/safejoin)](https://cran.r-project.org/package=safejoin)\n\n\u003c!-- badges: end --\u003e\n\n## 🚧 Deprecation notice 🚧\n\nAs of `safejoin` version 0.2.0 the package has been deprecated.  As of version [`1.1.1`](https://dplyr.tidyverse.org/news/index.html#dplyr-111) dplyr has a `relationship` argument that provides the same functionality that `safejoin` was created for. See the dplyr docs [https://dplyr.tidyverse.org/reference/mutate-joins.html](https://dplyr.tidyverse.org/reference/mutate-joins.html) for complete details.\n\nPlease use `dplyr::left_join()` with the `relationship` argument instead.\n\n## About\n\nThe goal of safejoin is to guarantee that when performing joins that extra rows are not added to your data. safejoin is a wrapper around the [`dplyr::left_join`](https://dplyr.tidyverse.org/reference/mutate-joins.html) function.\n\n-   [Docs](https://safejoin-r.netlify.app/)\n-   [GitHub](https://github.com/SamEdwardes/safejoin/)\n-   [CRAN](https://CRAN.R-project.org/package=safejoin)\n\n## Installation\n\nYou can install the released version of safejoin from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"safejoin\")\n```\n\nInstall development version from GitHub:\n\n``` r\ndevtools::install_github(\"SamEdwardes/safejoin\", ref = \"dev\")\n```\n\n## Example\n\nDepending on your need safejoin can raise an error, a warning, or a message. By default safejoin will raise an error.\n\n**Error**:\n\n```{r example, error=TRUE}\nlibrary(safejoin)\nx \u003c- data.frame(key = c(\"a\", \"b\"), value_x = c(1, 2))\ny \u003c- data.frame(key = c(\"a\", \"a\"), value_y = c(1, 1))\nsafe_left_join(x, y, by = \"key\")\n```\n\n**Warning**:\n\n```{r example_warning}\nsafe_left_join(x, y, by = \"key\", action=\"warning\")\n```\n\n**Message**:\n\n```{r example_message}\nsafe_left_join(x, y, by = \"key\", action=\"message\")\n```\n\nWhen a join is \"safe\" `safe_left_join` will have the exact same behavior as [`dplyr::left_join`](https://dplyr.tidyverse.org/reference/mutate-joins.html).\n\n```{r}\nx \u003c- data.frame(key = c(\"a\", \"b\"), value_x = c(1, 2))\ny \u003c- data.frame(key = c(\"a\", \"b\"), value_y = c(1, 1))\nsafe_left_join(x, y, by = \"key\")\n```\n\n## Other useful packages\n\nThere are other packages that help solve similar problems. Most notably \u003chttps://github.com/cynkra/dm\u003e provides great features to treat data frames like a data base.\n\n## Reference and Attribution\n\nsafejoin is created and maintained by Sam Edwardes.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamedwardes%2Fsafejoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamedwardes%2Fsafejoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamedwardes%2Fsafejoin/lists"}