Monthly Archives: December 2009

Rcpp and inline example

December 20, 2009
By

Following up on yesterday's Rcpp 0.7.0 release, here is a quick example of why the new feastures can be so useful. The following R code defines a character variable gslrng. This variable contains a short C++ code segment, which is then transformed by ...

Read more »

Rcpp and inline example

December 20, 2009
By

Following up on yesterday's Rcpp 0.7.0 release, here is a quick example of why the new feastures can be so useful. The following R code defines a character variable gslrng. This variable contains a short C++ code segment, which is then transformed by the function cfunction into a function of two arguments assigned to funx: ## now use Rcpp to...

Read more »

got R? get social science for R!

December 19, 2009
By

Drew Conway has a great list of 10 must-have R packages for social scientists. If you’re a social scientist (or really, any kind of scientist) who doesn’t use R, now is a great time to dive in and learn; there are tons of tutorials and guides out there (my favorite is Quick-R, which is incredibly

Read more »

Rcpp 0.7.0

December 19, 2009
By

A new release of Rcpp awaits inclusion on CRAN and has also been sent as a .deb to Debian. It will hit mirrors over the next few days, in the meantime you can get it here as well. This release has a couple new features : inline support: the cf...

Read more »

Rcpp 0.7.0

December 19, 2009
By

A new release of Rcpp awaits inclusion on CRAN and has also been sent as a .deb to Debian. It will hit mirrors over the next few days, in the meantime you can get it here as well. This release has a couple new features : inline support: the cfunction...

Read more »

Rcpp 0.7.0

December 19, 2009
By

A new release of Rcpp awaits inclusion on CRAN and has also been sent as a .deb to Debian. It will hit mirrors over the next few days, in the meantime you can get it here as well. This release has a couple new features : inline support: the cf...

Read more »

Because it’s Friday: The decline of empires

December 18, 2009
By

Here's a neat visualization of the decline of the British, Spanish, Portugese and French empires from 1800 to present day. It's definitely more art than stats -- judging by the relative size of India and Australia I think the circles are scaled to area, not population -- but it definitely does capture the drama and the ebb and flow...

Read more »

Using Complex Numbers in R

December 18, 2009
By
Using Complex Numbers in R

This post is a continuation of my series dealing with matrix operations for image processing. My next goal is to demonstrate the construction of simple low-pass and high-pass spatial frequency filters in R. It’s easy enough to construct simple versions of these filters in R using the Fast Fourier Transform (also known as the FFT),

Read more »

The unmarried parenthood rate in Mexico

December 18, 2009
By
The unmarried parenthood rate in Mexico

Using data from the INEGI I calculated the percentage of births who were born outside of marriage in Mexico and compared it to the Hispanic rate in the US. They are basically the same. There’s been a gigantic increase that’s slouching towards 50% a...

Read more »

Plot ROC curve and lift chart in R

December 18, 2009
By
Plot ROC curve and lift chart in R

This tutorial with real R code demonstrates how to create a predictive model using cforest (Breiman’s random forests) from the package party, evaluate the predictive model on a separate set of data, and then plot the performance using ROC curves ...

Read more »