Skip to content

Instantly share code, notes, and snippets.

View trestletech's full-sized avatar

Jeff Allen trestletech

View GitHub Profile
@trestletech
trestletech / server.R
Created March 25, 2014 16:42
ConditionalPanel + Plot Shiny Resizing Bug
library(shiny)
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
print("Plotting");
Sys.sleep(1)
# generate and plot an rnorm distribution with the requested
# number of observations
@trestletech
trestletech / server.R
Created March 25, 2014 21:49
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
@trestletech
trestletech / server.R
Last active August 29, 2015 13:57 — forked from garrettgman/server.R
library(shiny)
library(ggplot2)
shinyServer(function(input, output, session) {
if (!is.null(session$user)) {
data <- iris
p <- qplot(Sepal.Width, Sepal.Length, data = iris, color = Species)
output$ui <- renderUI({
navbarPage(
library(shiny)
library(ggplot2)
authorized <- TRUE
shinyServer(function(input, output, session) {
if (authorized) {
data <- iris
p <- qplot(Sepal.Width, Sepal.Length, data = iris, color = Species)
@trestletech
trestletech / .gitignore
Last active August 29, 2015 14:01
Slides from RStudio's presentation on Shiny at R/Finance 2014. Hosted version available here: https://trestletech.shinyapps.io/rfinance2014/an-introduction-to-rstudio-shiny.Rmd#1
.Rproj.user
.Rhistory
.RData
@trestletech
trestletech / keybase.md
Created June 16, 2014 14:18
keybase.io Verification

Keybase proof

I hereby claim:

  • I am trestletech on github.
  • I am trestletech (https://keybase.io/trestletech) on keybase.
  • I have a public key whose fingerprint is BEB4 8BDF C60B 99A9 203B 9361 3E37 05BF 1EA7 87A9

To claim this, I am signing this object:

@trestletech
trestletech / .gitignore
Last active August 29, 2015 14:04
VM for Go
.vagrant
pkg
src
bin
@trestletech
trestletech / README.md
Last active August 29, 2015 14:04
Configure Shiny Server (Pro) to use different libraries for different locations/applications.

Below are two approaches to configuring applications to use different sets of libraries in Shiny Server. The envir file only works in Shiny Server Pro, as it relies on the exec_supervisor argument. The other will work in either.

---
title: "ShinyPres"
runtime: shiny
output: ioslides_presentation
---
## Shiny Presentation
This R Markdown presentation is made interactive using Shiny. The viewers of the presentation can change the assumptions underlying what's presented and see the results immediately.
@trestletech
trestletech / .gitignore
Last active August 29, 2015 14:08
An analysis of todo.txt lists from the todo.txt++ project.
login.json
.Rproj.user