Publications by Ram
Simulating Allele Counts in a population using R
This post is inspired by the Week 7 lectures of the Coursera course “Introduction to Genetics and Evolution” (I highly recommend this course for anyone interested in genetics, BTW.) Professor Noor uses a Univ Washington software called AlleleA1 for trying out scenarios.We can just as well use R to get an intuitive feel for how All...
3194 sym 8 img
R – Simple Recursive XML Parsing
This is intended for those who are starting out in R and interested in parsing an XML document recursively. It uses DT Lang’s XML package.If you want to just read certain types of nodes, then XPATH is great. This document by DT Lang is perfect for that.However, if you want to read the whole document, then you have to recursively vis...
956 sym
R – Defining Your Own Color schemes for HeatMaps
This post is intended at those who are beginners at R, and is inspired by a small post in Martin’s bioblog.First, we plot a “correlation heatmap” using the same logic that Martin uses. In our example, let’s use the Movies dataset that comes with ggplot2.We take the 6 genre columns, and we can compute the correlation matrix for...
2071 sym 4 img
R Beginners – Plotting Locations on to a World Map
This post is targeted at those who are just getting started plotting on maps using R.The relevant libraries are: maps, ggplot2, ggmap, and maptools. Make sure you install them.The Problem Let’s take a fairly simple use case: We have a few points on the globe (say Cities) that we want to mark on the map.The ideal and natural choice f...
1418 sym 4 img
Using R and Integer Programming to find solutions to FlowFree game boards
Using R and Integer Programming to find solutions to FlowFree game boards What is FlowFree?A popular game (iOS/Android) on a square board with simple rules. As the website states: Connect matching colors with pipes to create a flow. Pair all colors, and cover the entire board to solve each puzzle in Flow Free.If you play a few games, you will be...
4758 sym 12 img
Using R and Shiny to create “Art”
One big strength of packages like shiny is the ability to easily vary parameters and view the results, especially in plots.So here’s a small shiny app that I created to learn about reactivity, while also having fun.The idea is simple. Vary many aspects of geom_segments in ggplot, and see what emerges. The things that I played with are canvas si...
1078 sym 4 img
What are the hottest areas for CS Research? (Based on Google Research 2013)
What are some of the hottest areas of research in Computer Science at the moment (August 2013)? And at which universities is this research being carried out?The answers are subjective by definition, but looking at the numbers behind the Google Research awards announced yesterday can provide some quick insights. Going by the grants as a proxy for ...
1232 sym 4 img
Using R to visualize Karpov-vs-Kasparov Lifetime winner-take-all tally
The Karpov vs. Kasparov rivalry holds a special place in the chess world.The idea behind this analysis is simple. If we take their lifetime games, plot the wins, what would it look like? We introduce one twist — we’ll be plotting the “winner-take-all” tallies, meaning that for every year, every five years, and every decade, we...
2910 sym 8 img
Anand versus Carlsen – Chennai 2013 – What can we expect in November?
This year, the world chess championship will be played between Vishwanathan Anand and 22-yo Magnus Carlsen, in Chennai, India from the 9th to the 28th of November. The passions are sure to run strong. Both GMs have ardent supporters. Carlsen is in a dreamlike form, and Anand has the experience and the home field advantage. But what do the numbers...
3889 sym 6 img
Doodling with Data 2013-12-31 20:50:00
A select few posts from 2013Rstudio’s Shiny enabled me to try out ideas on the Web.WeatherCompareshinySketchEscherPlotMovieRatings ** Creating MazesThe most visitors came from these two posts:The hottest areas in CS for 2013 – per Google Research grantsAnand-vs-Carlsen: What the numbers tell?Happy 2014, everyone.Ram Related To leave a comm...
720 sym