RInside release 0.2.0

December 22, 2009
By

RInside, a set of convenience classes to facilitate embedding of R inside of C++ applications, was updated to release 0.2.0 over the weekend. Sources as well as binary packages are at CRAN; sources are also at my RInside page The biggest news is t...

Read more »

Multilevel and Longitudinal Modeling in Stata

December 22, 2009
By

For my "off-task" reading I recent perused an excellent book on multilevel and longitudinal modeling in Stata by Sophia Rabe-Hesketh and Anders Skrondal. The second edition (which I read) has been updated by including several chapters providing an over...

Read more »

Visualizing Unemployment in Mexico

December 22, 2009
By
Visualizing Unemployment in Mexico

What has been the impact of the economic crisis on employment? And how has it affected the different regions of Mexico? To answer the questions the first step was to obtain the unemployment data from the Banco de Información Económica at the INEGI. ...

Read more »

CPP package: exposing C++ objects

December 22, 2009
By

I've just started working on the new package CPP, as usual the project is maintained in r-forge. The package aims at exposing C++ classes at the R level, starting from classes from the c++ standard template library. key to the package is the CPP f...

Read more »

Forecasting the weather with R

December 22, 2009
By
Forecasting the weather with R

The US National Centers for Environment Prediction (NCEP) produces weather forecasts for the entire world from a model that's updated every 6 hours. The data is made freely available, and with a couple of free tools to convert the data and R you can easily produce am unpdated global weather forecast like this (click to enlarge): (Check out the...

Read more »

Singapore, February 19-20: Computational Topics in Finance

December 21, 2009
By

With all of the winter snows in the US this weekend, a trip to equatorial climes sounds pretty good right about now. That makes this email announcement from Rmetrics leader Diethelm Wuertz all the more tempting: Conference on 'Computational Topics in Finance' February 19/20, 2010, National University of Singapore Dear R/Rmetrics Community, We would like to announce the first...

Read more »

Animation video of rgl in action

December 21, 2009
By

Duncan Murdoch just posted a youtube video presenting an animation clip of a 3d rgl object. Duncan even went further and wrote an explanation on how he made the video: here are the steps I used: 1.  Design a shape to be displayed, and then play with the animation functions to make it change over time.  Use play3d to do

Read more »

MCMCglmm

December 21, 2009
By
MCMCglmm

This R packages estimates Generalised Linear Mixed Models via MCMC. It provides a number of random error distributions and can be used for multivariate multilevel models (simultaneous equation model).I will do some tests and compare the results to othe...

Read more »

Sweave in TeXShop

December 21, 2009
By

I love using TeXShop for GUI editing of LaTeX and particularly Sweave documents, but it is a pain not being able to get it to automatically generate the pdf output. Luckily I found this post which explains how to add a Sweave engine.Basically, make a f...

Read more »

Sweave in TeXShop

December 21, 2009
By

I love using TeXShop for GUI editing of LaTeX and particularly Sweave documents, but it is a pain not being able to get it to automatically generate the pdf output. Luckily I found this post which explains how to add a Sweave engine.Basically, make a f...

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 »

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 »

SAS and R included on R bloggers

December 18, 2009
By
SAS and R included on R bloggers

The R bloggers site is an aggregator for blogs about R. We're excited to be joining that community and suggest any readers of this blog may also find it useful.

Read more »

Visualizing Data with R and ggplot2 (video w/ slides)

December 18, 2009
By

On December 3, 2009 I presented a brief talk at the NYC R meetup on how to create data visualizations with R using the immensely powerful ggplot2 package. The talk is very light on motivation but heavy on examples, so it may be more useful to those with some R and/or ggplot2 experience.

Read more »

Joining data frames in R

December 17, 2009
By
Joining data frames in R

Want to join two R data frames on a common key? Here's one way do a SQL database style join operation in R.We start with a data frame describing probes on a microarray. The key is the probe_id and the rest of the information describes the location on t...

Read more »

Image Compression with the SVD in R

December 17, 2009
By
Image Compression with the SVD in R

Over the next few posts, I’m going to be reviewing the use of R to implement the most commonly used matrix techniques for image manipulation. The code will be surprisingly simple to understand, because the real magic behind these techniques lies in the mathematics that R provides an abstract interface to. To start, I’m going

Read more »

R Blogs

December 17, 2009
By

There are many blogs on Statistics, R and other related topics scattered around the internet. The R bloggers website provides a central hub where feeds from participating blogs are collated so that they can be viewed from a single website. This resources certainly appears to be a good idea so that people can more easily identify

Read more »

Why use plyr?

December 17, 2009
By

The "apply" family of functions in R (apply, sapply, lapply) is a very powerful suite of tools for iterating through structures of data and returning the combined results of each iteration. But with great power comes great responsibility (or something like that): these functions can sometimes be frustratingly difficult to get working exactly as you intended, especially for newcomers...

Read more »

Data Profiling in R

December 17, 2009
By
Data Profiling in R

In 2006 UserR conference Jim Porzak gave a presentation on data profiling with R. He showed how to draw summary panels of the data using a combination of grid and base graphics. Unfortunately the code has not (yet) been released as a package, so when I recently needed to quickly review several datasets at the

Read more »

Matrix Algebra in R: Resources, Videos, Textbooks

December 17, 2009
By
Matrix Algebra in R: Resources, Videos, Textbooks

I noticed how John Myles White has posted a useful overview of Matrix Algebra in R. This post lists a couple of other resources that are available on the Internet on the topic, including R resources, online video courses, and online textbooks.Matrix Al...

Read more »