Welcome to INCLUDE. This repository will serve as a guide for developing shiny applications and contains the most basic golem shiny application structure.
You can install the released version of includeshinytemplate from CRAN with:
install.packages("includeshinytemplate")
And the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("include-dcc/include-shiny-template")
This is a basic example which shows you how to solve a common problem:
library(includeshinytemplate)
## basic example code
After copying this template, these are the files that must be updated with your repository name.
After updating these files, please make sure to run the functions in
dev/01_start.R
to update this repository.
If you want to push this shiny application to CAVATICA, add a github
secret with your CAVATICA_AUTH_TOKEN. Make sure you also create a
CAVATICA project. Comment the deploy
section of the
.github/workflows/ci.yaml
.
In this shiny application template we try to follow the guidelines
described by Engineering Production-Grade Shiny Apps:
https://engineering-shiny.org/index.html. In particular we utilize
tools such as golem
and renv
to build our shiny application. The
steps described below can all be found in more detail in the shiny
engineering link above.
Create Golem Shiny App: golem::create_golem()
as documented
here
Utilize renv to set up your R environment
Update readme by modifying README.Rmd (not README.md):
devtools::build_readme()
Add golem modules. You will most likely want to remove
mod_hello_world.R
and add your own golem module. Be sure to add to
app_ui.R
and app_ui.R
to use your module. More information
here
golem::add_module( name = "hello_world" )
Add tests. More information here
usethis::use_test( "app" )
Need to use Python? Use
reticulate Be sure to use
either conda
or pipenv
to manage your Python dependencies.
The CI/CD for this repository is done through github actions and consists of 3 major steps. The file is located at .github/workflows/ci.yaml
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.