{"id":14067876,"url":"https://github.com/react-R/forcer","last_synced_at":"2025-07-30T02:32:13.616Z","repository":{"id":34646892,"uuid":"165397893","full_name":"react-R/forcer","owner":"react-R","description":"example React-based htmlwidget for react-force-graph","archived":false,"fork":false,"pushed_at":"2023-01-04T03:05:29.000Z","size":5368,"stargazers_count":5,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-13T07:13:57.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/react-R.png","metadata":{"files":{"readme":"README.Rmd","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}},"created_at":"2019-01-12T14:38:23.000Z","updated_at":"2021-08-06T06:35:59.000Z","dependencies_parsed_at":"2023-01-15T08:30:20.652Z","dependency_job_id":null,"html_url":"https://github.com/react-R/forcer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-R%2Fforcer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-R%2Fforcer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-R%2Fforcer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-R%2Fforcer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-R","download_url":"https://codeload.github.com/react-R/forcer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228075634,"owners_count":17865508,"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":[],"created_at":"2024-08-13T07:05:49.539Z","updated_at":"2024-12-04T08:31:19.125Z","avatar_url":"https://github.com/react-R.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**For demonstration purposes** - easy enough to turn into a CRAN-worthy package; let me know if you have interest\n\n# forcer\n\n`forcer` is a quickly assembled `htmlwidget` for Vasco Asturiano's [`react-force-graph`](https://github.com/vasturiano/react-force-graph).  The package is designed to work but also primarily to demonstrate how to use `reactR::scaffoldWidget` to create an `htmlwidget` from a `React` component.  Please see the tutorial [htmlwidgets with reactR](https://react-r.github.io/reactR/articles/intro_htmlwidgets.html) for the steps to go from `React` component to fully functioning `htmlwidget`. \n\n## Installation\n\nInstall the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"react-R/forcer\")\n```\n\n## Example\n\nHere are some very quick examples to demonstrate the three types of force-directed graphs provided.\n\n```{r example}\nlibrary(d3r)\nlibrary(igraph)\nlibrary(forcer)\n\n# VR crashed my RStudio so open in real browser\noptions(viewer = NULL)\n\n# 2D\nforcer(\n  data = d3r::d3_igraph(igraph::make_tree(60,3,mode=\"in\")),\n  forcetype = \"ForceGraph2D\",\n  nodeColor = list(\"#0f0\"),\n  linkCurvature = 0.25\n)\n```\n\n... and for 3d and a-frame VR ...\n\n```{r eval=FALSE}\n# 3D\nforcer(\n  data = d3r::d3_igraph(igraph::make_tree(60,3)),\n  forcetype = \"ForceGraph3D\"\n)\n\n# VR\nforcer(\n  data = d3r::d3_igraph(igraph::make_tree(60,3)),\n  forcetype = \"ForceGraphVR\"\n)\n\n```\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-R%2Fforcer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-R%2Fforcer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-R%2Fforcer/lists"}