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.
This file contains 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
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 |
This file contains 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
#' 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())) |
This file contains 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
# 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/) |
This file contains 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(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 |
This file contains 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
################################################################################ | |
## | |
## Server-side script for the game | |
## | |
################################################################################ | |
## required packages ########################################################### | |
## for convenient data.frame handling | |
library("plyr") | |
## for all of the plots |
This file contains 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
## 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") |
This file contains 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(ggplot2) | |
shinyServer(function(input, output) { | |
dataset <- reactive(function() { | |
diamonds[sample(nrow(diamonds), input$sampleSize),] | |
}) | |
output$plot <- reactivePlot(function() { |