Category Archives: Useless Knowledge

R is like a giant calculator for grownups

One of the things that is interesting about R is how flexible it is. One of the fun things about it is how interactive it can be. While my examples so far have been a little bit more involved, it can be useful to spend some time just getting acquainted with how R performs basic [...]

Also posted in (all categories), Geekiness | Tagged , | 1 Comment

A little spark for presenting your data

For some reason, I’ve been obsessing over the presentation of data. (Either it is that I’ve just read all of Edward Tufte‘s books, or I’m just being a nerd. But I guess that those two things aren’t exactly exclusive….) Considering my obsession, you could imagine how I felt when one of my students stood up [...]

Also posted in (all categories), Geekiness, OpenOffice.org | Tagged , , , | 2 Comments

It’s a choropleth party with R, and everyone’s invited

Map party time. For some reason this happens every once in a while with me. A few years ago, I got to develop a website filled with choropleth maps galore. It was a pretty tedious process. Excel sheets. Photoshop. No good access to free Indian shapefiles. I was even thinking of making my own SVG [...]

Also posted in (all categories), Geekiness, India | Tagged , , | 3 Comments

Quickly reshaping data from “wide” to “long” formats in R

A lot of the times, students at the Academy enter data in a “wide” format (since it is a very natural way to enter data in a spreadsheet). Let’s say, for example, that they were collecting data for a household, and for each person, they were collecting information on three variables. Assume also that they [...]

Also posted in (all categories), Geekiness | Tagged , , , | 4 Comments

Sampling with replacement in R

In my last post about sampling (Simple sampling with R) we were doing simple sampling without replacement–that is, each item could only be selected once. However, there are times when you want to simulate sampling with replacement. For example, if you wanted to simulate sampling the results of rolling a dice 50 times, your outcomes [...]

Also posted in (all categories), Geekiness | Tagged , , , | 1 Comment

Simple sampling with R

I mentioned in an earlier post (Am I inconsistent?) that I got interested in R because Amy had asked me to help her with some sampling at one point. Since that was my starting point, I thought I would share some of my experiments with you. In this post: Simple random sampling Simple random sampling [...]

Also posted in Geekiness | Tagged , , , | 1 Comment