Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DavidBarke/shinyExplorer
R Package providing Explorer and Contextmenu for Shiny apps
https://github.com/DavidBarke/shinyExplorer
Last synced: 9 days ago
JSON representation
R Package providing Explorer and Contextmenu for Shiny apps
- Host: GitHub
- URL: https://github.com/DavidBarke/shinyExplorer
- Owner: DavidBarke
- License: other
- Created: 2019-11-04T18:46:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-25T21:37:11.000Z (over 4 years ago)
- Last Synced: 2024-08-13T07:12:49.380Z (4 months ago)
- Language: R
- Homepage: https://davidbarke.github.io/shinyExplorer/
- Size: 214 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - DavidBarke/shinyExplorer - R Package providing Explorer and Contextmenu for Shiny apps (R)
README
---
output: github_document
---[![Travis build status](https://travis-ci.org/DavidBarke/shinyExplorer.svg?branch=master)](https://travis-ci.org/DavidBarke/shinyExplorer)
[![Coverage status](https://codecov.io/gh/DavidBarke/shinyExplorer/branch/master/graph/badge.svg)](https://codecov.io/github/DavidBarke/shinyExplorer?branch=master)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# shinyExplorershinyExplorer uses `DT::datatable` for visualizing a tree of nodes, in which each node behaves according to its class and can store arbitrary data.
## Installation
Currently shinyExplorer is only available on Github. You can install the latest version with:
```{r, eval=FALSE}
remotes::install_github("DavidBarke/shinyExplorer")
```## Explorer
Create an explorer tree:
```{r, eval=FALSE}
library(shinyExplorer)explorer_tree <- ExplorerTree$new(id = "tree", root_id = "root")
```Take the root node and add nodes to it:
```{r, eval=FALSE}
explorer_tree$get_root_node()$add_child("child1")$add_child("child2", return = "child")$add_child("grandchild")
```Call the `explorer` module in your server function and add `explorer_ui` to your UI:
```{r, eval=FALSE}
# Inside the server function
shiny::callModule(
module = explorer, id = "id_explorer",
.root_node_r = shiny::reactive(explorer_tree$get_root_node())
)# Explorer UI
explorer_ui(id = ns("id_explorer"))
```## Contextmenu