Created
March 27, 2024 15:49
-
-
Save ColinFay/5e912ad423d363e06500ff750cbbd833 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(xfun) | |
library(cli) | |
# Define UI | |
ui <- fluidPage( | |
titlePanel("what"), | |
tags$code( | |
h3("Sys.getenv()"), | |
verbatimTextOutput("sysgetenv") | |
), | |
tags$code( | |
h3("options()"), | |
verbatimTextOutput("options") | |
), | |
tags$code( | |
h3("Sys.info()"), | |
verbatimTextOutput("sysinfo") | |
), | |
tags$code( | |
h3("xfun::session_info()"), | |
verbatimTextOutput("sessioninfo") | |
), | |
tags$code( | |
h3("session$clientData"), | |
verbatimTextOutput("clientdata") | |
), | |
tags$code( | |
h3("session$userData"), | |
verbatimTextOutput("sessionuserdata") | |
), | |
tags$code( | |
h3("session$request"), | |
verbatimTextOutput("sessionrequest") | |
), | |
tags$code( | |
h3("session$options"), | |
verbatimTextOutput("sessionoptions") | |
), | |
tags$code( | |
h3("session - misc"), | |
verbatimTextOutput("sessionmisc") | |
) | |
) | |
# Define server logic | |
server <- function(input, output, session) { | |
# Your application server logic | |
output$sysgetenv <- renderPrint({ | |
Sys.getenv() | |
}) | |
output$options <- renderPrint({ | |
options() | |
}) | |
output$sysinfo <- renderPrint({ | |
Sys.info() | |
}) | |
output$sessioninfo <- renderPrint({ | |
xfun::session_info() | |
}) | |
output$clientdata <- renderPrint({ | |
reactiveValuesToList(session$clientData) | |
}) | |
output$sessionuserdata <- renderPrint({ | |
as.list(session$userData) | |
}) | |
output$sessionrequest <- renderPrint({ | |
as.list(session$request) | |
}) | |
output$sessionoptions <- renderPrint({ | |
session$options | |
}) | |
output$sessionmisc <- renderPrint({ | |
cli::cat_rule("session$user") | |
cli::cat_line() | |
print(session$user) | |
cli::cat_line() | |
cli::cat_rule("session$groups") | |
cli::cat_line() | |
print(session$groups) | |
cli::cat_line() | |
cli::cat_rule("session$token") | |
cli::cat_line() | |
print(session$token) | |
cli::cat_line() | |
cli::cat_rule("session$singletons") | |
cli::cat_line() | |
print(session$singletons) | |
cli::cat_line() | |
cli::cat_rule("session$downloads$keys()") | |
cli::cat_line() | |
print(session$downloads$keys()) | |
cli::cat_line() | |
cli::cat_rule("session$files$keys()") | |
cli::cat_line() | |
print(session$files$keys()) | |
cli::cat_line() | |
}) | |
} | |
# Run the app | |
shinyApp(ui = ui, server = server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment