When I first saw a graphic made from Yihui’s animation package (Xie, 2012) I was amazed at the magic and thought “I could never do that”. Passage of time… One night I found myself bored and as usual avoiding work. … Continue reading →
When I first saw a graphic made from Yihui’s animation package (Xie, 2012) I was amazed at the magic and thought “I could never do that”. Passage of time… One night I found myself bored and as usual avoiding work. … Continue reading →
(This article was first published on Econometrics by Simulation, and kindly contributed to R-bloggers) # I am interested in how small bits of individualized instructions can create collective action.# In this simulation I will give a single instruction to each individual in the swarm.# Choose another individual who is not too close, then accelerate towards that individual.# I also...
Please note that this is programming I purely did for the learning experience. The pure R bubble sort implemented in this post is veeeeery slow for two reasons: Interpreted code with lots of iteration is very slow. Bubble sort is…
Just a short post, to share some codes used to generate animated graphs, with R. Assume that we would like to illustrate the law of large number, and the convergence of the average value from binomial sample. We can generate samples using > n=200 > k=1000 > set.seed(1) > X=matrix(sample(0:1,size=n*k,replace=TRUE),n,k) Each row will be a trajectory of heads and...
Whenever somebody mentions “The Simpsons” it always stirs up feelings of nostalgia in me. The characters, uproarious gags, zingy one-liners, and edgy animation all contributed towards making, arguably, the greatest TV ever. However, it’s easy to forget that as a TV show “The Simpsons” is still ongoing—in its twenty-fourth season no less. For me, and 

Spotting international conflict is very easy with the GDELT data set, combined with ggplot and R. The simple gif above shows snapshots of Russian/Soviet activity from January 1980 and January 2000. I think it also illustrates how Russia nowadays looks more to the east and the South than during the Cold War. The trend, though...
by Joseph Rickert Life decisions are usually much too complicated to be attributed to any single cause, but one important reason that I am here at Revolution today is that I ignored suggestions from well-meaning faculty back in graduate school to work more in SAS rather than doing everything in R. There was a heavy emphasis on SAS then:...
My research has allowed me to implement techniques for visualizing multivariate models in R and I wanted to share some additional techniques I’ve developed, in addition to my previous post. For example, I think a primary obstacle towards developing a useful neural network model is an under-appreciation of the effects model parameters have on model 