sps: SystemPipeShiny app main function

View source: R/spsCore.R

spsR Documentation

SystemPipeShiny app main function

Description

SystemPipeShiny app main function

Usage

sps(
  tabs = "",
  server_expr = NULL,
  login_message = shiny::h3("User login"),
  app_path = getwd()
)

Arguments

tabs

custom visualization tab IDs that you want to display, in a character vector. Use spsTabInfo() to see what tab IDs you can load

server_expr

additional top level sever expression you want to run. This will run after the default server expressions. It means you can have access to internal server expression objects, like the shiny::reactiveValues() object shared. You can also overwrite other values. Read "shared object" in manual.

login_message

a shiny tag that will be displayed on the top of login panel, default is a H3 title with text "User login", shiny::h3("User login"). If you need more information, you can do something like ⁠div(h3("Login"), p("Some more message))⁠.

app_path

SPS project path

Details

You must set the project root as working directory for this function to find required files.

About this function

Usually you call this function inside the global.R file when SPS initialization is done. This function does not contain too many options. Most choices are controlled by SPS options which are also listed in global.R (some lines before calling this function in that file).

Value

a list contains the UI and server

Examples

if(interactive()){
    spsInit()
    sps_app <- sps(
        tabs = "",
        server_expr = {
            msg("Hello World", "GREETING", "green")
        }
    )
}

systemPipeR/systemPipeS documentation built on Oct. 21, 2023, 12:18 p.m.