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(dplyr) | |
| library(ggvis) | |
| library(shiny) | |
| shinyServer(function(input, output, session) { | |
| session$onSessionEnded(function() { | |
| stopApp() | |
| }) | |
| mtcars$cyl <- factor(mtcars$cyl, levels = c(4L,6L, 8L)) | |
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) | |
| shinyServer(function(input, output, session) { | |
| session$onSessionEnded(function() { | |
| stopApp() | |
| }) | |
| date.range <- as.Date(c("2015-01-01", "2015-12-31")) | |
| # ------- Date Range Input + previous/next week buttons--------------- | |
| output$choose.date <- renderUI({ |
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) | |
| shinyServer( | |
| function(input, output) { | |
| x <- data.frame(PRODUCT=factor(c("ALPHA", "ALPHA","BRAVO","ALPHA","ALPHA")), | |
| YYYYMM= factor(c("2/1/2015","3/1/2015","4/1/2015","5/1/2015","6/1/2015")), | |
| COUNT=c(44,22,37,76,97)) | |
| ## select only rows where PRODUCT = input$product | |
| x1 <- reactive({ |
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(ggplot2) | |
| library(dplyr) | |
| server <- function(input, output, session){ | |
| weekdays <- c("Sunday", "Monday", "Tuesday", "Wednesday", | |
| "Thursday", "Friday", "Saturday") | |
| rv <- reactiveValues( | |
| dt = data.frame( |
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) | |
| ui <- fluidPage( | |
| # Application title | |
| titlePanel("mtcars"), | |
| sidebarLayout( | |
| sidebarPanel( | |
| sliderInput("mpg", "mpg Limit", |
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
| --- | |
| output: html_document | |
| --- | |
| ```{r} | |
| library(tidyverse) | |
| library(kableExtra) | |
| library(knitr) | |
| a <- mpg %>% |
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(imager) | |
| library(colocr) | |
| # Define UI for application that draws a histogram | |
| ui <- navbarPage( | |
| title = 'colocr', | |
| tabPanel( | |
| 'Main', | |
| sidebarLayout( |
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(broom) | |
| library(tidyverse) | |
| library(viridis) | |
| fit <- lm(mpg ~ ., data = mtcars) | |
| fit_dt <- tidy(fit, conf.int = T) | |
| # reverse the order so it looks right on plot |
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
| /*! | |
| * Bootstrap v3.3.7 (http://getbootstrap.com) | |
| * Copyright 2011-2018 Twitter, Inc. | |
| * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
| */ | |
| /*! | |
| * Generated using the Bootstrap Customizer (<none>) | |
| * Config saved to config.json and <none> |
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
| --- | |
| title: "Untitled" | |
| author: "Hao" | |
| date: "7/10/2019" | |
| output: pdf_document | |
| --- | |
| ```{r setup, include=FALSE} | |
| knitr::opts_chunk$set(echo = TRUE) | |
| ``` |
OlderNewer