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(dplyr) | |
server <- function(input, output) { | |
output$downloadData <- downloadHandler( | |
filename = function() { | |
paste('data_', Sys.Date(), '.csv', sep='') | |
}, |
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
# install.packages("shiny") | |
# install.packages("miniUI") | |
# install.packages("ggplot2") | |
library(shiny) | |
library(miniUI) | |
library(ggplot2) | |
outlier_rm <- function(data, xvar, yvar) { | |
ui <- miniPage( |
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: "MOMA" | |
author: "VP Nagraj" | |
date: "February 29, 2016" | |
output: html_document | |
runtime: shiny | |
--- | |
The Museum of Modern Art (MOMA) collection database is publicly available via Github: |
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: "RMarkdown(Pandoc(LaTeX))" | |
author: "VP Nagraj" | |
date: "March 3, 2016" | |
output: | |
html_document: | |
keep_md: yes | |
--- | |
```{r, warning=FALSE, message=FALSE} |
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
# list manipulation workshop | |
# scratch script | |
# november 9 2016 | |
############################################# | |
slamwins <- list(17,14,14,12,11) | |
############################################# |
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) | |
options(shiny.reactlog=TRUE) | |
# define home dir for shiny app | |
homed <- getwd() | |
# set up choices to be retrievable in server.R | |
progchoices <- c("This is a TEST APP" = "testapp/", | |
"Yet Another Program" = "anotherprog/") | |
ui <- fluidPage( |
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
# script to demonstrate outbreak animation with a subset of mers_korea_2015 data | |
# must install github release of threejs package | |
# devtools::install_github("bwlewis/rthreejs") | |
library(threejs) | |
library(outbreaks) | |
library(dplyr) | |
# use dplyr to subset results to only include hospital visit exposure |
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
# install.packages("babynames") | |
library(babynames) | |
# install.packages("tidyverse") | |
library(tidyverse) | |
# install.packages("ggplot2") | |
# install.packages("dplyr") | |
# let's take a look at the data | |
babynames %>% | |
View() |
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
# script to demonstrate outbreak animation with a subset of mers_korea_2015 data | |
# must install github release of threejs package | |
# devtools::install_github("bwlewis/rthreejs") | |
library(threejs) | |
library(outbreaks) | |
library(dplyr) | |
# use dplyr to subset results to only include hospital visit exposure |
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(ggplot2) | |
library(tidyr) | |
dat <- data.frame(x = rnorm(n = 1000, mean = 2.8, sd = 0.05), | |
y1 = sample(64503:73034, size = 1000, replace = TRUE), | |
y2 = sample(18738:19602, size = 1000, replace = TRUE)) | |
dat %>% | |
ggplot() + | |
geom_point(aes(x,y1)) + |
OlderNewer