Monthly Archives: July 2011

R 2.13.1 released

July 8, 2011
By

As announced by the R core team, R 2.13.1 has been released on schedule today. For those who build R themselves, updated source code is available now; pre-built binaries will propagate through the CRAN network over the next couple of days. This update includes some minor bug fixes to graphics, fixes to some edge cases in the class systems,...

Read more »

The R Programming Wikibook

July 8, 2011
By
The R Programming Wikibook

The R Programming wikibook is an open source community project that "aims to create a cross-disciplinary practical guide to the R programming language." It was launched in June 2011 and is seeking content and contributors. The full call for the R Progr...

Read more »

Analyzing the Failed States Index (with Polity IV)

July 7, 2011
By
Analyzing the Failed States Index (with Polity IV)

So, I decided to sit down and have a little fun with that Failed States Index data I put together. To start, I expect that the dataset will be pretty linearly correlated with the polity IV data. This makes sense–true democracies aren’t failed states, and failed states tend not to be democratic. To test this,

Read more »

Scary Derivatives and Scary XML in R

July 7, 2011
By
Scary Derivatives and Scary XML in R

I need some new R skills, and there is no better motivation to learn XML in R than one of the scariest financial datasets out there—the US Department of the Treasury Office of the Comptroller of the Currency (OCC) Quarterly Derivatives Report. I’ll...

Read more »

High-quality R graphics on the Web with SVG

July 7, 2011
By
High-quality R graphics on the Web with SVG

If you want the graphics you create with R to look their best, in general it's best to go for a vector-based graphics format instead of a raster-based format. Common formats like GIF and JPG are raster-based: the image is composed of pixels, and if you don't choose a high enough resolution, you're likely to lose fine details and/or...

Read more »

GLMM Hell

July 7, 2011
By
GLMM Hell

I have been starting to analyze some data I have of repeated counts of salamanders from 5 plots over 4 years. I am trying to develop a predictive model of salamander nighttime surface activity as a function of weather variables. The repeated counting l...

Read more »

A simple ggplot2 scatterplot revisited

July 7, 2011
By

Rick Wicklin contacted me with a helpful suggestion for improving the data presentation method outlined in my  previous post on using ggplot2 to visualize some data. In the previous post I had plotted up a highly correlated set of points, showing the correspondence between maximum daily body temperatures of model snails sitting with the foot

Read more »

Twitter Math Puzzle and Solution

July 7, 2011
By

Yesterday I posted a very simple math puzzle to Twitter that I found in Jonathan Baron’s book, Thinking and Deciding. The puzzle is the following: Show that every number of the form ABC,ABC is divisible by 13. The puzzle comes up in Baron’s book as an example of an “insight problem” in which one goes

Read more »

Twitter Math Puzzle and Solution

July 7, 2011
By

Yesterday I posted a very simple math puzzle to Twitter that I found in Jonathan Baron’s book, Thinking and Deciding. The puzzle is the following: Show that every number of the form ABC,ABC is divisible by 13. The puzzle comes up in Baron’s book as an example of an “insight problem” in which one goes

Read more »

R: calculations involving months

July 7, 2011
By
R: calculations involving months

Ask anyone how much time has elapsed since September last year and they’ll probably start counting on their fingers: “October, November…” and tell you “just over 9 months.” So, when faced as I was today with a data frame (named dates) like this: How to add a 7th column, with the number of months between

Read more »