Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

include-dcc/clinical-include-r

Repository files navigation

Clinical Include R Shiny Application

Lifecycle: experimental

Welcome to INCLUDE. This repository will serve as a guide for developing shiny applications and contains the most basic golem shiny application structure.

Installation

You can install the released version of clinicalincluder from CRAN with:

install.packages("clinicalincluder")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("include-dcc/clinical-include-r")

Example

This is a basic example which shows you how to solve a common problem:

library(clinicalincluder)
#> Error in get(genname, envir = envir) : object 'testthat_print' not found
## basic example code

Developmental Guide

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.

  1. Create Golem Shiny App: golem::create_golem() as documented here

  2. Utilize renv to set up your R environment

  3. Update readme by modifying README.Rmd (not README.md):

    devtools::build_readme()
    
  4. 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" )
    
  5. Add tests. More information here

    usethis::use_test( "app" )
    
  6. Need to use Python? Use reticulate Be sure to use either conda or pipenv to manage your Python dependencies.

  7. 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

    • test: Testing of the shiny package
    • docker: This section is commented out ci.yaml but you can choose to un-comment it out if you want to use this.
    • deploy: Upload this to CAVATICA project so it can be used in data cruncher.

About

Shiny application that displays clinical data

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published