January 2011

Recreating Gapminder World Map with R & ggplot2

January 11, 2011 | Jason

Gapminder has posted an interesting chart using world development indicators from the World Bank. I thought it would be a good exercise to recreate this chart using R and ggplot2. While playing with the data, not log transforming GDP provides some interesting, and perhaps different, interpretation. The R script and ... [Read more...]

Maps with R, part… n+1

January 11, 2011 | arthur charpentier

Following the idea posted on James Cheshire's blog (here), I have tried to play a little bit with R and Google. And it works ! Consider for instance life expectancy at birth (that can be found - and downloaded - here). Using the following code, it ...
[Read more...]

Cursed numbers ?

January 11, 2011 | arthur charpentier

In Lost, Hugo “Hurley” Reyes played the numbers 4, 8, 15, 16, 23 and 42 at the lottery, and ended up winning the $114-million jackpot. And over the ensuing weeks, everyone around him seems to suffer increasingly bad luck: Hurley’s grandfathe...
[Read more...]

table() in R

January 11, 2011 | Numerator

The table function in R is very useful, especially when working with survey data. Often you may have Likert scales for levels of agreement or satisfaction. table() quickly gives the distribution of answers, which can then be used for (bar)plots.However... [Read more...]

User Account Control (Windows)

January 11, 2011 | Numerator

When using Windows Vista / 7, Windows' User Account Control can be annoying. When is R going to be Windows 7 ready, asking for elevated priviliges only when needed? I guess the problem lies in the structure of packages.Running Rgui.exe "as Administrato... [Read more...]

OpenData + R + Google = Easy Maps

January 11, 2011 | James

The release of the R package “googleVis” has made the production of interactive maps through Google’s Chart Tools a simple task. Ignoring the some basic data manipulation the below map... [Read more...]

Le Monde puzzle [1]

January 10, 2011 | xi'an

Following the presentation of the first Le Monde puzzle of the year, I tried a simulated annealing solution on an early morning in my hotel room. Here is the R code, which is unfortunately too rudimentary and too slow to be able to tackle n=1000. #minimise \sum_{i=1}^I x_... [Read more...]

Revolution R with Eclipse Helios

January 10, 2011 | nmv

One of the reasons that I don’t often take advantage of the cool features in Revolution R is that I absolutely can’t stand their Visual Studio interface. Previously, if I wanted to run something in RevoR, I fired up the … Continue reading → [Read more...]

Seasonal pair trading

January 10, 2011 | Dzidorius Martinaitis

quanttrader.info is a good quantitative repository, where I found an idea about seasonal spreads play. The idea of seasonal pair trading differs from pairs trading in a way, that it doesn’t try to find deviation from the spread’s mean, but it looks at seasonal spread patterns. In ...
[Read more...]

Install R Packages wherever needed

January 10, 2011 | Numerator

I frequently occupy computers everywhere with extensive MCMC tasks. Installing R doesn't take long, but it can be very annoying if you manually have to install dozens of R packages before your code is able to run. Well, now I use the following command ... [Read more...]

General-purpose MCMC draw saver for R

January 10, 2011 | Numerator

If you do MCMC with R, you probably know how nasty "bookkeeping" of draws can be. So I quickly coded up a small function which does everything for you. Every parameter has to begin with "mcmc_" or another to-be-defined string, then just run mcmcsave... [Read more...]
1 6 7 8 9 10 11

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)