{"id":16572979,"url":"https://github.com/yonicd/jstree","last_synced_at":"2025-09-23T05:30:52.466Z","repository":{"id":55869749,"uuid":"92959201","full_name":"yonicd/jsTree","owner":"yonicd","description":"R htmlwidget for inspecting heirachal structures with the ‘jQuery’ ‘jsTree’ Plugin.","archived":false,"fork":false,"pushed_at":"2020-12-12T18:05:38.000Z","size":50627,"stargazers_count":31,"open_issues_count":5,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-13T08:11:55.909Z","etag":null,"topics":["htmlwidgets","jquery-plugin","r"],"latest_commit_sha":null,"homepage":"https://yonicd.github.io/jsTree/","language":"HTML","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/yonicd.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":"2017-05-31T15:12:46.000Z","updated_at":"2024-08-06T16:05:12.000Z","dependencies_parsed_at":"2022-08-15T08:10:39.520Z","dependency_job_id":null,"html_url":"https://github.com/yonicd/jsTree","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/yonicd%2FjsTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonicd%2FjsTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonicd%2FjsTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonicd%2FjsTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yonicd","download_url":"https://codeload.github.com/yonicd/jsTree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233933666,"owners_count":18753432,"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":["htmlwidgets","jquery-plugin","r"],"created_at":"2024-10-11T21:29:07.941Z","updated_at":"2025-09-23T05:30:44.315Z","avatar_url":"https://github.com/yonicd.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\nalways_allow_html: yes\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"tools/readme/README-\",\n  echo = TRUE\n)\n```\n\n\u003c!-- badges: start --\u003e\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/jsTree)](https://cran.r-project.org/package=jsTree)\n[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/0.1.0/active.svg)](https://www.repostatus.org/#active)\n![downloads](http://cranlogs.r-pkg.org/badges/jsTree)\n[![R-CMD-check](https://github.com/yonicd/jsTree/workflows/R-CMD-check/badge.svg)](https://github.com/yonicd/jsTree/actions)\n[![pkgdown](https://github.com/yonicd/jsTree/workflows/pkgdown/badge.svg)](https://github.com/yonicd/jsTree/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/yonicd/jsTree/master.svg)](https://codecov.io/github/yonicd/jsTree?branch=master)\n\u003c!-- badges: end --\u003e\n\n# jsTree\n\n`R` htmlwidget for inspecting heirachal structures with the 'jQuery' 'jsTree' Plugin.\n\n```{r,include=FALSE}\nknitr::opts_chunk$set(eval = FALSE)\n```\n\n## Installation\n\n```{r,eval = FALSE}\n#install.packages('jsTree')\nremotes::install_github('yonicd/jsTree')\n```\n\n## Conventional Use\n\n```{r}\nlibrary(jsTree)\ndata(states)\ndata(state_bird)\n```\n\ncollapse columns to text (with sep \"/\")\n\n```{r}\nnested_string \u003c- apply(states,1,paste,collapse='/')\njsTree(nested_string)\n```\n\nAdd tooltips to state names with the state bird\n```{r}\njsTree(nested_string,tooltips = state_bird)\n```\n\ninitialize tree with checked boxes for certain fields\n```{r}\nnodestate1 \u003c- states$variable=='Area'\njsTree(nested_string,nodestate=nodestate1)\n```\n\n```{r}\nnodestate2 \u003c- states$variable=='Area'\u0026grepl('^M',states$state.name)\njsTree(nested_string,nodestate=nodestate2)\n```\n\n```{r}\nnodestate3 \u003c- states$variable %in% c('Murder') \u0026 states$value \u003e= 10\nnodestate4 \u003c- states$variable %in% c('HS.Grad') \u0026 states$value \u003c= 55\njsTree(nested_string,nodestate=nodestate3|nodestate4)\n```\n\nchange the order of the hierarchy\n```{r}\nnested_string2 \u003c- apply(states[,c(4,1,2,3,5)],1,paste,collapse='/')\njsTree(nested_string2)\n```\n\nUse other delimiters to define the heirarchy\n```{r}\nnested_string \u003c- apply(states,1,paste,collapse='|-|')\njsTree(nested_string,sep = '|-|')\n```\n\n## Interacting with remote repositories\n\n### Preview a github repo without cloning it\n\n```r\nremotes::install_github('yonicd/vcs')\n\n#get repo master branch directory structure\n  vcs::navigate_remote('tidyverse/ggplot2')\n```\n\n![](https://github.com/yonicd/jsTree/blob/master/Miscellaneous/preview_gh_example.gif?raw=true)\n\n### Search text in files of a repo without cloning it\n\n![](https://github.com/yonicd/jsTree/blob/master/Miscellaneous/jstree_vcs_grepr.gif?raw=true)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonicd%2Fjstree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyonicd%2Fjstree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonicd%2Fjstree/lists"}