├── README.md ├── .gitignore └── test_app └── app.R /README.md: -------------------------------------------------------------------------------- 1 | # shiny_test_deploy 2 | Test app for rsconnect deployment 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # History files 2 | .Rhistory 3 | .Rapp.history 4 | 5 | # Session Data files 6 | .RData 7 | 8 | # User-specific files 9 | .Ruserdata 10 | 11 | # Example code in package build process 12 | *-Ex.R 13 | 14 | # Output files from R CMD build 15 | /*.tar.gz 16 | 17 | # Output files from R CMD check 18 | /*.Rcheck/ 19 | 20 | # RStudio files 21 | .Rproj.user/ 22 | 23 | # produced vignettes 24 | vignettes/*.html 25 | vignettes/*.pdf 26 | 27 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 28 | .httr-oauth 29 | 30 | # knitr and R markdown default cache directories 31 | *_cache/ 32 | /cache/ 33 | 34 | # Temporary files created by R markdown 35 | *.utf8.md 36 | *.knit.md 37 | 38 | # R Environment Variables 39 | .Renviron 40 | -------------------------------------------------------------------------------- /test_app/app.R: -------------------------------------------------------------------------------- 1 | # 2 | # This is a Shiny web application. You can run the application by clicking 3 | # the 'Run App' button above. 4 | # 5 | # Find out more about building applications with Shiny here: 6 | # 7 | # http://shiny.rstudio.com/ 8 | # 9 | 10 | library(shiny) 11 | 12 | # Define UI for application that draws a histogram 13 | ui <- fluidPage( 14 | 15 | # Application title 16 | titlePanel("Deploying a change"), 17 | 18 | # Sidebar with a slider input for number of bins 19 | sidebarLayout( 20 | sidebarPanel( 21 | sliderInput("bins", 22 | "Number of bins:", 23 | min = 1, 24 | max = 50, 25 | value = 30) 26 | ), 27 | 28 | # Show a plot of the generated distribution 29 | mainPanel( 30 | plotOutput("distPlot") 31 | ) 32 | ) 33 | ) 34 | 35 | # Define server logic required to draw a histogram 36 | server <- function(input, output) { 37 | 38 | output$distPlot <- renderPlot({ 39 | # generate bins based on input$bins from ui.R 40 | x <- faithful[, 2] 41 | bins <- seq(min(x), max(x), length.out = input$bins + 1) 42 | 43 | # draw the histogram with the specified number of bins 44 | hist(x, breaks = bins, col = 'darkgray', border = 'white') 45 | }) 46 | } 47 | 48 | # Run the application 49 | shinyApp(ui = ui, server = server) 50 | --------------------------------------------------------------------------------