My book continues growing. I have recently completed the first version of the Spatio-Temporal visualization chapters. Moreover, a significant part …
In case you missed them, here are some articles from May of particular interest to R users: Billions of geotagged Tweets create a beautiful map of the world when plotted with the ggmap package. A review of Ryan Sheftel's talk at R/Finance, on how he uses R on the trading desk at Credit Suisse. Also, a quick take on...
"Bees don't swarm in a mango grove for nothing. Where can you see a wisp of smoke without a fire?" - Hla Stavhana
In the last two posts, genetic algorithms were used as feature wrappers to search for more effective subsets of predictors. Here, I will do the same with another type of search algorithm: particle swarm optimization....
It’s an episode of firsts on the R-Podcast! In this episode recorded on location I had the honor and privilege of interviewing Yihui Xie, author of many innovative packages such as knitr and animation. Some of the topics we discussed include: Yihui’s motivation for creating knitr and some key new features How markdown plays a
So when the world is taken over by a Zombie horde, you're going to want to figure out a way to get the human population to safety. This R script by econometrician Francis Smart won't help you do that exactly, but given a list of waypoints to navigate through zombie-infested lands to a safe house, it will tell you...
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 →
# 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 control momentum causing the previous movement and direction to...
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...