# Monthly Archives: May 2012

## reshape (from base) Explained: Part II

May 5, 2012
By

Part II Explains More Complex  Wide to Long With base reshape  In part I of this base reshape tutorial we went over the basics of reshaping data with reshape.  We learned two rules that help us to be more efficient … Continue reading →

Two days ago, Conrad Sanderson released another bug-fix version 3.0.3 for the 3.0.0 branch of his excellent Armadillo C++ template library for linear algebra. The new RcppArmadillo release 0.3.0.3 which contains it appeared on CRAN yesterday. Beside ...

## Making an Animated Heart GIF in R

May 5, 2012
By

Messing around with animations, I created this toy example to make a growing outline of a heart in R. I have put it up as a gist on GitHub and embedded it below. It uses the animation and the ggplot2 packages--both of which make it incredibly simple to...

## What’s Up with Albert Pujols?

May 5, 2012
By

After signing a huge deal with the Angels, Pujols has been having a really bad year. He hasn't hit a home run this year, breaking a career long streak. So I thought it would be a good idea to use some statistics to tell how good or bad we think Pujols will actually be this year.Coming into the year,...

## Visualizing tables in ggplot2

May 5, 2012
By

Recently I wanted to recreate  assocplot  using  ggplot2. In the end I propose a simple way to visualize data arranged two-way tables using geom_tile.I used Titanic data set as an example combining age and sex dimensi...

## Compiling R code, and speed up your computation

May 5, 2012
By

I just ran into this interesting post on the R-bloggers Planet. The described R functionality allows you to compile R code (to byte code) so that it will no longer be interpreted but actually run. That is a performance boost. I guess in due time we will see R use JIT technologies, so that the difference will...

## Kaplan-Meier Survival plot – with at risk table, by sub groups

May 4, 2012
By

This is a follow on from the previous post, with updated code. There was an argument ‘groups’ in the ggplot(…) line of the code that was working but is now no longer working with the updated version of R/ggplot2 (I … Continue reading →

## Correlations, dimension, and risk measure

May 4, 2012
By

Yesterday, while I was attending the IFM2 conference, at HEC Montreal, I heard a nice talk about credit risk, and a comparison between contagion (or at least default correlation), for corporate and retail companies (in the US). And it was mentioned...

## R, now a major programming language, sees a 127% growth in book sales

May 4, 2012
By

O'Reilly Radar tracks technology adoption via its annual "State of the Computer Book Market" report. In the latest report of 2011 book sales (amongst all publishers), books about R show a 127% increase in 2011 over 2010: As a language specifically for data analysis, R isn't in the same league in raw sales as general-purpose languages like C++ or...

## Getting R2WinBUGS to talk to WinBUGS 1.4 on Ubuntu 12.04 LTS

May 4, 2012
By

Disclaimer 1: WinBUGS is old and not maintained. There are other packages to use, if you would like to take advantage of more modern developments in MCMC such as: PyMC which transparently implements adaptive Metropolis-Hastings proposals (among other great features), or the LaplacesDemon R package, which … Continue reading →