https://github.com/Martin-McCoy/shinyVirga
A Collection of R shiny utilities by Virga Labs
https://github.com/Martin-McCoy/shinyVirga
Last synced: 3 months ago
JSON representation
A Collection of R shiny utilities by Virga Labs
- Host: GitHub
- URL: https://github.com/Martin-McCoy/shinyVirga
- Owner: Martin-McCoy
- License: other
- Created: 2022-09-29T21:38:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T15:56:33.000Z (9 months ago)
- Last Synced: 2024-05-29T07:09:14.906Z (9 months ago)
- Language: R
- Homepage: https://martin-mccoy.github.io/shinyVirga/
- Size: 8.76 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - Martin-McCoy/shinyVirga - A Collection of R shiny utilities by Virga Labs (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
warning = FALSE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
devtools::load_all()
```# shinyVirga
`r lifecycle::badge('experimental')`
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)The goal of `shinyVirga` is to consolidate generalized utility functions useful in development of shiny apps that are currently used in the various Virga Labs repositories in one convenient location. `shinyVirga` is intended to supply Virga Labs developers with a toolkit of well-maintained functions and modules adaptable to various use cases encountered likely to be encountered during shiny development with Virga Labs.
## Installation
You can install the development version of shinyVirga like so:
``` r
virgaUtils::install_virga("shinyVirga")
```
```{r, echo = FALSE, eval = FALSE}get_rd_section <- function (rd_path)
{
rd <- rvest::read_html(glue::glue_collapse(capture.output(tools::Rd2HTML(rd_path))))
out <- rvest::html_elements(rd, xpath = UU::xpath_sibling_between("h3[contains(text(), 'Description')]", following_sibling = "h3[contains(text(), 'Usage')]", preceding_sibling = "p")) |>
as.character()
shiny::HTML(out)
}```
The utility functions are divided into five categories (some functions overlap categories):
```{r, echo = FALSE, results='asis', warning=FALSE, eval = FALSE}
purrr::map(rlang::set_names(c("General",
"UI",
"CSS",
"JS",
"Reactives",
"golem",
"debugging")), ~{
rlang::exec(htmltools::tags$ul,
style = "list-style-type:none;",
!!!functionMap::map_r_script(UU::dirs$R(glue::glue("utils_{tolower(.x)}"), ext = "R")) |> functionMap::functions() |> purrr::map(~{
htmltools::tags$li(htmltools::tags$code(.x),": ", get_rd_section(fs::path("man", .x, ext = "Rd")) %|try|% NULL)
})
)
}) |> named_to_li(style = "list-style-type:none;") |> htmltools::doRenderTags()```
```{r, echo = FALSE}
bs4Dash::bs4Table(UU::fun_docs_table())
```