https://github.com/hamilton-institute/appMaker
R package to create a shiny app template with Distill theme.
https://github.com/hamilton-institute/appMaker
Last synced: 4 months ago
JSON representation
R package to create a shiny app template with Distill theme.
- Host: GitHub
- URL: https://github.com/hamilton-institute/appMaker
- Owner: hamilton-institute
- License: other
- Created: 2020-11-09T14:49:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-17T20:00:44.000Z (over 4 years ago)
- Last Synced: 2024-08-13T07:10:54.272Z (8 months ago)
- Language: R
- Size: 42 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - hamilton-institute/appMaker - R package to create a shiny app template with Distill theme. (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# appMaker
The goal of appMaker is to create apps with the Hamilton Institute Distill theme.
## Installation
You can install the appMaker from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("hamilton-institute/appMaker")
```## Creating a simple app
To create a simple app you need to run:
```{r,eval=FALSE}
library(appMaker)create_simple_app(path = "~/Desktop/myApp")
```The code above will create a RStudio project called `myApp` at your Desktop folder (change the path to a existing folder if you don't have a Desktop folder). A new RStudio session will open automatically with this project open.
The created project has a placeholder app in the `app.R` file. To create your app, you need to modify the `ui` object and `server` function in this file. If you want to keep the Distill theme, do not remove the `hamiltonThemes::` functions.
## Creating a dashboard
To create a dashboard you need to run:
```{r,eval=FALSE}
library(appMaker)create_dash(path = "~/Desktop/myDashboard")
```The code above will create a RStudio project called `myDashboard` at your Desktop folder (change the path to a existing folder if you don't have a Desktop folder). A new RStudio session will open automatically with this project open.
The created project has a placeholder [golem shiny app](https://github.com/ThinkR-open/golem). Golem uses [shiny modules](https://shiny.rstudio.com/articles/modules.html), so you have the modify the `app_ui.R`, `app_server.R` and all `mod_.R` files to create your app.
A golem shiny app is a R package, what is great to develop any app with too many lines of code. To run the app, run `devtools::load_all()` to load all functions at R folder. After that, run the `run_app()` function in the Console.
If you want to keep the Distill theme, do not remove the `hamiltonThemes::` functions.