Skip to content

Instantly share code, notes, and snippets.

@trestletech
Created March 25, 2014 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trestletech/9772142 to your computer and use it in GitHub Desktop.
Save trestletech/9772142 to your computer and use it in GitHub Desktop.
Shiny App for testing run_as -- just displays the user the R process is running as.
library(shiny)
# Define server logic required to generate and plot a random distribution
shinyServer(function(input, output) {
# Expression that generates a plot of the distribution. The expression
# is wrapped in a call to renderPlot to indicate that:
#
# 1) It is "reactive" and therefore should be automatically
# re-executed when inputs change
# 2) Its output type is a plot
#
output$text <- renderText({
Sys.info()["user"]
})
})
library(shiny)
# Define UI for application that plots random distributions
shinyUI(pageWithSidebar(
# Application title
headerPanel("Hello Shiny!"),
# Sidebar with a slider input for number of observations
sidebarPanel(
),
# Show a plot of the generated distribution
mainPanel(
verbatimTextOutput("text")
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment