knitr::opts_chunk$set(echo = TRUE)

The configuration YML file provides the wiring instructions for generating the shinyapp R files. Hence, it is important for the app developer to pay attention and understand this file . By default the file is named config.yml you can change this name to suit to your needs.

The information below describes the config.yml structure and defaults.

Top Level

+------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | Property and default value | Details | +====================================================================================+===================================================================================================================================================+ | dashboard_template: bs4_dash | At this time on bs4_dash is only supported | +------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | template_file: !expr system.file("bs4/bs4_standard.mst" , package = "shinyspring") | Supports | | | | | | 1. bs4_minimal.mst | | | 2. bs4_standard.mst | +------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | code_gen_location: '.' | where will the code be created | +------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | dummy_test.mod_name: dummy_mod dummy_test.weird_param: dummy | Leave this as it is. It is there to overcome a bug | +------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | shinyspring_config : config.yml | Recommendation to keep config.yml . If you change take care to change all defaults downstream in build chain | +------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | preload_dataset: true | At this only only true works. Future support will give option to turn this off | +------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | source_file_onstartup: on_startup.R | names the the file that needs to be sourced before shinyapp launches. If you change take care to change all defaults downstream in build chain | +------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+

Dataset Configuration

Shown below is a basic example of loading 3 datasets into the shinyspring environment

Menus

Wiring menu's requires a bit more care as we rely on Whisker/Mustache5 based templating for nested structures which can be little bit more involved. Sample menu structure is provided below.

 menus: [
    { title: Introduction , name: intro_tab , icon: university  },
    { title: Core Analysis , name: core_tab , icon: indent  },
    { title: Data Exploration ,  icon: chart-bar ,  parent_menu: true ,
       sub_menu: [
         {first:  true ,submenu_title: Visualize , submenu_name: explore_tab , submenu_icon: circle-thin } ,
         {last_submenu:  true , submenu_title: Correlations , submenu_name: corr_tab , submenu_icon: cubes } ,
       ]
    },
    { title: Credits , name: credits_tab , icon: heart , last_menu: true }
  ]

Modules

Modules are defined with the pattern [module name].[module property]: value . Structure sample below

  custom_mod.mod_name: dummy_mod
  custom_mod.ui_function: dummy_mod_ui
  custom_mod.server_function: dummy_mod_server
  custom_mod.onload_function: dummy_mod_onLoad
  custom_mod.param1: param 1
  custom_mod.param2: param 2

Authentication

Authentication support is based on shinymanager package It is not fully developed. You can try the preview version with the following in configuration file

basic_auth: true

Scheduling

targets package



shambhu112/shinyspring documentation built on July 9, 2021, 2:07 p.m.