knitr::opts_chunk$set( eval = FALSE, collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Used to provide reusable components, gadgets, and modules for the BOAST project.
You can install this version of boastUtils from GitHub with:
devtools::install_github("EducationShinyAppTeam/boastUtils")
Troubleshooting: - Error: (converted from warning) package 'xyz' was built under R version x.y.z
Create an issue if the problem is not solved by one of the above.
One way to accomplish serving a more standardized codebase was to provide a wrapper for the default shinyApp function. Instead of including the shiny package, include boastUtils and write your app as normal. Be sure to replace shinyApp with boastApp.
Example app.R
library(boastUtils) ui <- fluidPage( # ... ui definitions ... ) server <- function(input, output, session){ # ... server logic ... } boastApp(ui = ui, server = server)
We currently have one config option available which disables xAPI logging.
Example app.R
boastApp(ui = ui, server = server, config = list(log = FALSE))
To connect with services such as CouchDB for persistent storage, place details in an environment variable using appDir/inst/.Renviron. This information is then pulled into boastUtils/inst/config.yml on app startup. These details are meant to be kept private and should not be pushed to GitHub.
See also:
boastUtils:::.getConfig().Renviron
DB_USER=<DATABASE_USERNAME> DB_PASSWORD=<DATABASE_PASSWORD> R_CONFIG_ACTIVE=rsconnect
config.yml
default: database: host: 'localhost' transport: 'https' port: NULL user: 'root' pwd: 'root' rsconnect: database: host: 'dev.stat.vmhost.psu.edu/couch' transport: 'https' port: NULL user: !expr Sys.getenv("DB_USER") pwd: !expr Sys.getenv("DB_PASSWORD")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.