Skip to content

Instantly share code, notes, and snippets.

View klittle314's full-sized avatar

Kevin Little klittle314

View GitHub Profile
@klittle314
klittle314 / app.R
Created November 19, 2015 19:55 — forked from jcheng5/app.R
Test Shiny app: submit and clear
#test app to load the form and clear it for second record entry
#Kevin Little, Ph.D. 18 Nov 2015
require(shiny)
require(shinyapps)
require(shinyjs)
#local df taking the place of a Google sheet
df1 <- data.frame(name="name1", stringsAsFactors = FALSE)
@klittle314
klittle314 / app.R
Last active November 18, 2015 21:36
Test Shiny app: submit and clear
#test app to load the form and clear it for second record entry
#Kevin Little, Ph.D. 18 Nov 2015
require(shiny)
require(shinyapps)
require(shinyjs)
#local df taking the place of a Google sheet
df1 <- data.frame(name="name1", stringsAsFactors = FALSE)
@klittle314
klittle314 / global.R
Last active December 20, 2015 16:29
simple dynamic ui shiny example
#Global function for test of DRG State Hospital display
# 29 July 2013 Kevin Little, Ph.D.
#create data elements: for each state, there are multiple hospitals that report
#values for multiple DRGs
State<-as.factor(rep(c("CA","CA","CA","CA","NJ","NJ","NJ","WY","WY"),3))
DRG<-as.factor(rep(c("101","102","103"),each=9))
Hospital<-as.factor(rep(c("C1","C2","C3","C4","N1","N2","N3","W1","W2"),3))
@klittle314
klittle314 / global.R
Created June 14, 2013 18:37
CMS DRG 2011 Shiny/R application
#global.R
#This is the set up of the data files for use in the Map DRG 100 example
# We create the master data file which will be subsetted by the Shiny application. The data file is in the working directory for the app
# Kevin Little, Ph.D., 13 June 2013 klittle@iecodesign.com
# app requires ggplot2 and googleVis packages
#example from CMS requires package ggplot2
d1<-read.csv("CMSexample.csv", colClasses="character")
summary(d1)
for(i in 9:11){