{"id":14068529,"url":"https://github.com/upsetjs/upsetjs_r","last_synced_at":"2025-05-07T20:38:37.945Z","repository":{"id":40419439,"uuid":"246096140","full_name":"upsetjs/upsetjs_r","owner":"upsetjs","description":"😠 htmlwidget R bindings for UpSet.js for rendering UpSet plots, Euler, and Venn Diagrams ","archived":false,"fork":false,"pushed_at":"2023-04-20T15:59:08.000Z","size":4358,"stargazers_count":36,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-07T20:38:29.808Z","etag":null,"topics":["euler","euler-diagram","htmlwidget","interactive","r","shiny","upset","upsetjs","upsetr","venn","venn-diagram"],"latest_commit_sha":null,"homepage":"https://upset.js.org/integrations/r","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/upsetjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-03-09T17:12:32.000Z","updated_at":"2024-10-12T23:01:29.000Z","dependencies_parsed_at":"2023-02-18T14:15:58.446Z","dependency_job_id":null,"html_url":"https://github.com/upsetjs/upsetjs_r","commit_stats":{"total_commits":286,"total_committers":2,"mean_commits":143.0,"dds":"0.010489510489510523","last_synced_commit":"972b8d4da3a36fa198a79e40014fc57d19aec1fa"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsetjs%2Fupsetjs_r","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsetjs%2Fupsetjs_r/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsetjs%2Fupsetjs_r/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsetjs%2Fupsetjs_r/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upsetjs","download_url":"https://codeload.github.com/upsetjs/upsetjs_r/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954125,"owners_count":21830892,"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":["euler","euler-diagram","htmlwidget","interactive","r","shiny","upset","upsetjs","upsetr","venn","venn-diagram"],"created_at":"2024-08-13T07:06:14.636Z","updated_at":"2025-05-07T20:38:37.919Z","avatar_url":"https://github.com/upsetjs.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# UpSet.js as R HTMLWidget\n\n[![CRAN][cran-image]][cran-url] [![Github Actions][github-actions-image]][github-actions-url] [![Open in Binder][binder]][binder-r-url] [![Open Docs][docs]][docs-r-url] [![Open example][example]][example-r-url]\n\nThis is a [HTMLWidget](https://www.htmlwidgets.org/) and [Plot.ly Dash](https://dash.plotly.com/r) wrapper around the JavaScript library [UpSet.js](https://github.com/upsetjs/upsetjs) and an alternative implementation of [UpSetR](https://www.rdocumentation.org/packages/UpSetR).\n\nThis package is part of the UpSet.js ecosystem located at the main [Github Monorepo](https://github.com/upsetjs/upsetjs).\n\n## Installation\n\n```R\n# CRAN version\ninstall.packages('upsetjs')\n# or\ndevtools::install_url(\"https://github.com/upsetjs/upsetjs_r/releases/latest/download/upsetjs.tar.gz\")\n\nlibrary(upsetjs)\n```\n\n## Example\n\n```R\nlistInput \u003c- list(one = c(1, 2, 3, 5, 7, 8, 11, 12, 13), two = c(1, 2, 4, 5, 10), three = c(1, 5, 6, 7, 8, 9, 10, 12, 13))\nupsetjs() %\u003e% fromList(listInput) %\u003e% interactiveChart()\n```\n\n![List Input Example](https://user-images.githubusercontent.com/4129778/79375541-10dda700-7f59-11ea-933a-a3ffbca1bfd2.png)\n\nsee also [UpSetJS.Rmd](https://github.com/upsetjs/upsetjs_r/blob/main/vignettes/upsetjs.Rmd)\n\n## Shiny Example\n\n```R\nlibrary(shiny)\nlibrary(upsetjs)\n\nlistInput \u003c- list(one = c(1, 2, 3, 5, 7, 8, 11, 12, 13),\n                  two = c(1, 2, 4, 5, 10),\n                  three = c(1, 5, 6, 7, 8, 9, 10, 12, 13))\n\nui \u003c- fluidPage(\n  titlePanel(\"UpSet.js Shiny Example\"),\n  upsetjsOutput(\"upsetjs1\"),\n)\n\nserver \u003c- function(input, output, session) {\n  # render upsetjs as interactive plot\n  output$upsetjs1 \u003c- renderUpsetjs({\n    upsetjs() %\u003e% fromList(listInput) %\u003e% interactiveChart()\n  })\n}\n\n# Run the application\nshinyApp(ui = ui, server = server)\n\n```\n\n![shiny](https://user-images.githubusercontent.com/4129778/79375695-51d5bb80-7f59-11ea-8437-40fa60ce425c.png)\n\nsee also [Shiny Examples](https://github.com/upsetjs/upsetjs_r/tree/main/shiny)\n\n## Dash Example\n\n```R\nlibrary(dash)\nlibrary(dashHtmlComponents)\nlibrary(upsetjs)\n\napp \u003c- Dash$new()\n\napp$layout(\n    htmlDiv(\n        list(\n            htmlH1(\"Hello UpSet.js + Dash\"),\n            upsetjsDash(id = \"upset\") %\u003e% fromList(list(a = c(1, 2, 3), b = c(2, 3)))\n                %\u003e% interactiveChart(),\n            htmlDiv(id = \"output\")\n        )\n    )\n)\napp$callback(\n    output = list(id = \"output\", property = \"children\"),\n    params = list(input(id = \"upset\", property = \"selection\")),\n    function(selection) {\n        sprintf(\"You selected \\\"%s\\\"\", selection$name)\n    }\n)\n\napp$run_server()\n```\n\nTODO\n\nsee also [Dash Examples](https://github.com/upsetjs/upsetjs_r/tree/main/dash)\n\n## Documentation\n\nthe package documentation is located at [![Open Docs][docs]][docs-r-url]. An introduction vignette is at [![Open Vignette][example]][example-r-url].\n\n## Venn Diagram\n\nBesides the main UpSet.js plot also Venn Diagrams for up to five sets are supported. It uses the same input formats and has similar functionality in terms of interaction.\n\n```R\nlistInput \u003c- list(one = c(1, 2, 3, 5, 7, 8, 11, 12, 13), two = c(1, 2, 4, 5, 10), three = c(1, 5, 6, 7, 8, 9, 10, 12, 13))\nupsetjsVennDiagram() %\u003e% fromList(listInput) %\u003e% interactiveChart()\n```\n\n![image](https://user-images.githubusercontent.com/4129778/84817608-8a574b80-b015-11ea-91b8-2ff17bb533e4.png)\n\nsee also [Venn.Rmd](https://github.com/upsetjs/upsetjs_r/blob/main/vignettes/venn.Rmd)\n\n## Karnaugh Maps Diagram\n\nBesides the main UpSet.js plot also a variant of a Karnaugh Map is supported. It uses the same input formats and has similar functionality in terms of interaction.\n\n```R\nlistInput \u003c- list(one = c(1, 2, 3, 5, 7, 8, 11, 12, 13), two = c(1, 2, 4, 5, 10), three = c(1, 5, 6, 7, 8, 9, 10, 12, 13))\nupsetjsKarnaughMap() %\u003e% fromList(listInput) %\u003e% interactiveChart()\n```\n\n![image](https://user-images.githubusercontent.com/4129778/86348506-09789080-bc60-11ea-9ed0-be0560269f7f.png)\n\nsee also [KMap.Rmd](https://github.com/upsetjs/upsetjs_r/blob/main/vignettes/kmap.Rmd)\n\n## Dev Environment\n\nrequirements:\n\n- R with packages: devtools, pkgdown\n- pandoc\n\n```sh\nnpm i -g yarn\nyarn install\nyarn sdks vscode\n```\n\n### Building\n\n```sh\nyarn lint\nyarn build\n```\n\n### R Package\n\n```sh\nyarn style:r\nyarn lint:r\nyarn check:r\nyarn build:r\n```\n\nor in R\n\n```R\ndevtools::load_all()\nstyler::style_pkg()\nlintr::lint_pkg()\ndevtools::check()\ndevtools::document()\ndevtools::build()\n```\n\n**R Package Website**\n\nwill be automatically updated upon push\n\n```sh\nyarn docs:r\n```\n\nor in R\n\n```R\ndevtools::build_site()\n```\n\n## Release\n\nuse `release-it`\n\n```sh\nyarn release\nRscript -e \"devtools::release()\"\n```\n\n## Privacy Policy\n\nUpSet.js is a client only library. The library or any of its integrations doesn't track you or transfers your data to any server. The uploaded data in the app are stored in your browser only using IndexedDB. The Tableau extension can run in a sandbox environment prohibiting any server requests. However, as soon as you export your session within the app to an external service (e.g., Codepen.io) your data will be transferred.\n\n## License / Terms of Service\n\n### Commercial license\n\nIf you want to use UpSet.js for a commercial application or in a commercial environment, the commercial license is the appropriate license. Contact [@sgratzl](mailto:sam@sgratzl.com) for details.\n\n### Open-source license\n\nThis library is released under the `GNU AGPLv3` version to be used for private and academic purposes.\nIn case of a commercial use, please get in touch regarding a commercial license.\n\n[github-actions-image]: https://github.com/upsetjs/upsetjs_r/workflows/ci/badge.svg\n[github-actions-url]: https://github.com/upsetjs/upsetjs_r/actions\n[codepen]: https://img.shields.io/badge/CodePen-open-blue?logo=codepen\n[binder]: https://mybinder.org/badge_logo.svg\n[binder-r-url]: https://mybinder.org/v2/gh/upsetjs/upsetjs_r/main?urlpath=rstudio\n[docs]: https://img.shields.io/badge/API-open-blue\n[docs-r-url]: https://upset.js.org/integrations/r/\n[example]: https://img.shields.io/badge/Example-open-red\n[example-r-url]: https://upset.js.org/integrations/r/articles/upsetjs.html\n[cran-image]: https://img.shields.io/cran/v/upsetjs\n[cran-url]: https://www.rdocumentation.org/packages/upsetjs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupsetjs%2Fupsetjs_r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupsetjs%2Fupsetjs_r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupsetjs%2Fupsetjs_r/lists"}