Skip to content

Instantly share code, notes, and snippets.

library(shiny)
library(ggplot2)
shinyServer(function(input, output) {
dataset <- reactive(function() {
diamonds[sample(nrow(diamonds), input$sampleSize),]
})
output$plot <- reactivePlot(function() {

The scatterplot matrix visualizations pairwise correlations for multi-dimensional data; each cell in the matrix is a scatterplot. This example uses Anderson's data of iris flowers on the Gaspé Peninsula. Scatterplot matrix design invented by J. A. Hartigan; see also R and GGobi. Data on Iris flowers collected by Edgar Anderson and published by Ronald Fisher.

## uncomment to install
## install.packages("ggplot2")
## install.packages("directlabels")
## install.packages("plyr")
## options(repos=c(RStudio='http://rstudio.org/_packages', getOption('repos')))
## install.packages("shiny")
## install.packages("devtools")
## devtools::install_github("shiny-incubator", "rstudio")
library("shiny")
################################################################################
##
## Server-side script for the game
##
################################################################################
## required packages ###########################################################
## for convenient data.frame handling
library("plyr")
## for all of the plots
@angrycoffeemonster
angrycoffeemonster / server.R
Last active December 10, 2015 12:58
Example test for HACS analysis
library(shiny)
library(datasets)
setwd("~/Downloads/R/E6")
E6Data <- read.table("dataHacs2.csv", header=TRUE, sep="," )
# We tweak the "am" field to have nicer factor labels. Since this doesn't
# rely on any user inputs we can do this once at startup and then use the
# value throughout the lifetime of the application
# mpgData <- E6Data
# First install requirements for BREW
# http://mxcl.github.com/homebrew/
# https://github.com/mxcl/homebrew/wiki/installation
# Requirements
# - An Intel CPU 2
# - OS X 10.5 or higher
# - Command Line Tools for Xcode (https://developer.apple.com/downloads)
# or Xcode with X11 (http://itunes.apple.com/us/app/xcode/id448457090)
# - Java Developer Update (https://connect.apple.com/)
#' Read xlsx files
#'
#' @param file The path to xlsx file
#' @param keep_sheets A vector of sheet name
#' @param header Whether include the head in the sheet
#' @param empty_row Whether to remove the empty rows
#' @export
xlsxToR <- function(file, keep_sheets = NULL, header = TRUE, empty_row = TRUE)
{
suppressWarnings(file.remove(tempdir()))
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04