Skip to content

Instantly share code, notes, and snippets.

@johndharrison
johndharrison / gray.js
Last active May 1, 2017 17:16
highcharts theme example
/**
* Gray theme for Highcharts JS
* @author Torstein Honsi
*/
Highcharts.theme = {
colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
chart: {
backgroundColor: {
# Define a dataset globally which will be available
# both to the UI and to the server.
# Rely on the 'WorldPhones' dataset in the datasets
# package (which generally comes preloaded).
library(datasets)
# Trim out the non-consecutive year from
library(ggplot2)
library(shinyIncubator)
shinyServer(function(input, output, session) {
output$plot <- renderPlot({
input$go
progress <- Progress$new(session)
Sys.sleep(1)
library(XML)
library(plyr)
library(pbapply)
xlsxToR <- function(file, keep_sheets = NULL, header = FALSE) {
temp_dir <- file.path(tempdir(), "xlsxToRtemp")
suppressWarnings(dir.create(temp_dir))
file.copy(file, temp_dir)
@johndharrison
johndharrison / server.R
Created October 21, 2013 22:30
R Shiny regression example
library(RJSONIO)
shinyServer(function(input, output, session) {
output$test <- renderUI({
noPoints <- as.integer(input$obs)
series <- toJSON(cbind(seq(88, 266, by = (266-88)%/%(noPoints-1)), 113))
tags$script(HTML(
paste0("$(document).ready(function () {