Skip to content

Instantly share code, notes, and snippets.

View christophM's full-sized avatar

Christoph Molnar christophM

View GitHub Profile
@christophM
christophM / mds.R
Last active December 19, 2015 15:09
Multidimensional Scaling "manually"
## Multidimensional Scaling (MDS)
## the data matrix
X <- matrix(c(10.39, 1.81, 2.30,
10.31, 1.74, 2.14,
9.93, 1.73, 2.18,
10.82, 2.02, 2.70), nrow = 4, byrow = TRUE)
rownames(X) <- c("Argentina", "Australia", "USA", "W.Samoa")
@christophM
christophM / start-game.R
Last active December 10, 2015 09:48
R-Script to start the drink tracker
## 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")
test
@christophM
christophM / server.R
Last active December 10, 2015 09:08
A drink tracker for your next party. This is a browser app using R and the new shiny package.
################################################################################
##
## Server-side script for the game
##
################################################################################
## required packages ###########################################################
## for convenient data.frame handling
library("plyr")
## for all of the plots