Skip to content

Instantly share code, notes, and snippets.

View kirillseva's full-sized avatar

Kirill Sevastyanenko kirillseva

View GitHub Profile
@kirillseva
kirillseva / rownames.R
Created June 13, 2016 22:06
I hate rownames
R-STABLE> a <- data.frame(a=1:5, b=head(letters, 5))
R-STABLE> a
a b
1 1 a
2 2 b
3 3 c
4 4 d
5 5 e
R-STABLE> b <- a[c(1,3,5),]
R-STABLE> b
@kirillseva
kirillseva / simulation.R
Last active July 12, 2017 00:34
People in a room giving dollars to random others
library(animation)
library(gganimate)
library(ggplot2)
library(ggthemr)
library(magrittr)
library(tweenr)
library(reshape2)
## Configurable parameters
NUM_PEOPLE = 45