An open API service indexing awesome lists of open source software.

https://github.com/mjfrigaard/shinypak

R package (code examples for Shiny App-Packages book)
https://github.com/mjfrigaard/shinypak

Last synced: 2 months ago
JSON representation

R package (code examples for Shiny App-Packages book)

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
options(
repos = "https://packagemanager.rstudio.com/all/__linux__/focal/latest")
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/",
out.width = "100%"
)
```

# shinypak

`shinypak` provides easy access all the Shiny app examples in the [Shiny App-Packages book](https://mjfrigaard.github.io/shiny-app-pkgs/) (which are stored in the [`sap`](https://github.com/mjfrigaard/sap) R package).[^all-apps] `shinypak` also has a few helper functions for checking the files and folders in a Shiny app-package.

[^all-apps]: Each of the apps in `shinypak` have a corresponding chapter and branch in the [sap repo](https://github.com/mjfrigaard/sap/branches/all).

## Installation

You can install the development version of `shinypak` from [GitHub](https://github.com/) after installing `remotes`:

```{r pak, message=FALSE, warning=FALSE, results='hide', eval=FALSE}
install.packages('pak')
pak::pak("mjfrigaard/shinypak", force = TRUE)
```

```{r pkg, message=FALSE, warning=FALSE, results='hide'}
library(shinypak)
```

## GitHub authentication

`shinypak` uses the [`gert` package](https://docs.ropensci.org/gert/) for Git/GitHub management (and assumes authentication was done automatically using the `credentials` package).[^credentials]

[^credentials]: Check out the documentation for the [`credentials` package](https://docs.ropensci.org/credentials/articles/intro.html)

## Available app-packages

All applications in `shinypak` come from chapters in [Shiny App-Packages book](https://bit.ly/ShinyAppPkgs). A full list of the available apps and topics are available in `topic_lookup`:

```{r head-topic_lookup-print, echo=TRUE, eval=FALSE}
head(topic_lookup, 10)
```

```{r head-topic_lookup, eval=TRUE, echo=FALSE}
knitr::kable(
head(topic_lookup, 10)
)
```

```{r tail-topic_lookup-print, echo=TRUE, eval=FALSE}
tail(topic_lookup, 10)
```

```{r tail-topic_lookup, eval=TRUE, echo=FALSE}
knitr::kable(
tail(topic_lookup, 10)
)
```

## Launching apps and app-packages

Launch an application from any section in the book using:

```{r , eval=FALSE}
launch(app = "02.3_proj-app")
```

```{r launch, echo=FALSE, out.width='100%', fig.align='center'}
knitr::include_graphics("man/figures/launch_readme.gif")
```