## Video: Seamless R Extensions using Rcpp and RInside

April 7, 2010
By

Dirk Eddelbuettel presented joint work with Romain François on calling C++ from R at the LA R User Group meeting last week. Now, with thanks to Drew Conway of the NY R User Group, video of the presentation is now available. It's also embedded below -- click on it for a larger view. Dirk's slides are also available for...

## Seamless R Extensions using Rcpp and RInside

April 7, 2010
By

I just added a new video to the R repository, and this one comes from the Los Angeles R Meetup. The folks in LA were fortunate enough to have Dirk Eddelbuettel—renowned R expert and StackOverflow super-user—discuss his joint work with Romain François for interfacing C++ and R code using the Rcpp package. For those

## Seamless R Extensions using Rcpp and RInside

April 7, 2010
By

Dirk Eddelbuettel discusses his joint work with Romain François for interfacing C++ and R code at the Los Angeles R Users Group on March 30, 2010. Dirk provides a motivation for the Rcpp packages, as well as examples and speed benchmarks.

## Matrix determinant with the Lapack routine dspsv

April 6, 2010
By

The Lapack routine dspsv solves the linear system of equations Ax=b, where A is a symmetric matrix in packed storage format. However, there appear to be no Lapack functions that compute the determinant of such a matrix. We need to compute the determinant, for instance, in order to compute the multivariate normal density function. The

## correlograms are correlicious

April 6, 2010
By

In the last year or so, I’ve been experimenting with different ways of displaying correlation matrices, and have gotten very fond of color-coded correlograms. Here’s one from a paper I wrote investigating the relationship between personality and word use among bloggers (click to enlarge): The rows reflect language categories from Jamie Pennebaker’s Linguistic Inquiry and

## New version of R package futile released

April 6, 2010
By

The latest version of futile was released to CRAN yesterday. This release broke out the various functions into self-contained sub-packages …Continue reading »

## Cherry Picking to Generalize ~ NASA Global Temperature Trends

April 6, 2010
By

The relatively (to this decade) cool 2008 global temperatures spurred talks of a warming pause, or even global cooling. The claim usually comes from people who cherry picked either data sets and(!)/or start and end points of the global temperature trends to back up their allegation. The blogosphere already has a lot on this: Skeptical

## Le Monde rank test (corr’d)

April 6, 2010
By
$Le Monde rank test (corr’d)$

Since my first representation of the rank statistic as paired was incorrect, here is the histogram produced by the simulation perm=sample(1:20) saple=sum(abs(sort(perm)-sort(perm))) when . It is obviously much closer to zero than previously. An interesting change is that the regression of the log-mean on produces > lm(log(memean)~log(enn)) Call: lm(formula = log(memean) ~ log(enn)) Coefficients: (Intercept)

## R package Blotter

April 6, 2010
By

How many times have you been disappointed by nice trading system, because neither trading cost or slippage or bid/ask spread were included into back-test results? Did you find difficult to back-test a portfolio in R or many portfolios with different stocks? Blotter package is supposed to solve these problems. In really – it is complicated. I

## ProbABEL – R package for GWAS data imputation

April 6, 2010
By

I've been using GenABEL for some time now for GWAS analysis using related individuals. It has an excellent set of functions for estimating a kinship matrix from a dense marker panel and then using this in a linear mixed effects model to allow for relat...

## New R User Group in Chicago

April 6, 2010
By

While there's been an informal coterie of R users in the Chicago area for some time (notably the fine folks behind the successful R/Finance conferences) there hasn't been a formal R User Group. Until now, that is. JD Long has taken the plunge and announced the new Chicago R User Group on meetup.com. If you're in the Chicagoland area,...

## Rules of Thumb to Meet R Gurus in the Help List

April 5, 2010
By

Here is my personal list of rules of thumb for people who want to meet some R gurus (quickly) in the R help mailing list ([email protected]): If you want to meet Dr Bill Venables, just say something about Type III Sum of Squares (better if you also mention the “unbeatable” SAS); If you want to

## R Tools for Dynamical Systems ~ R pplane to draw phase planes

April 5, 2010
By
$R Tools for Dynamical Systems ~ R pplane to draw phase planes$

MATLAB has a nice program called pplane that draws phase planes of differential equations models. pplane on MATLAB is an elaborate program with an interactive GUI where you can just type the model to draw the phase planes. The rest you fidget by clicking (to grab the initial conditions) and it draws the dynamics automatically.

## R on the iPhone

April 5, 2010
By

R Twitterer ech0chrome reports that (s)he has successfully installed R on an iPhone. I haven't tried it myself, since it requires jailbreaking the iPhone, but full instructions have been posted to the R Wiki. It seems that once you have Debian installed on the iPhone, it's simply a matter of installing the required Debian packages. Seems like a neat...

## Example 7.31: Contour plot of BMI by weight and height

April 5, 2010
By

A contour plot is a simple way to plot a surface in two dimensions. Lines with a constant Z value are plotted on the X-Y plane.Typical uses include weather maps displaying "isobars" (lines of constant pressure), and maps displaying lines of constant e...

## Le Monde rank test (cont’d)

April 5, 2010
By
$Le Monde rank test (cont’d)$

Following a comment from efrique pointing out that this statistic is called Spearman footrule, I want to clarify the notation in namely (a) that the ranks of and are considered for the whole sample, i.e. instead of being computed separately for the ‘s and the ‘s, and then (b) that the ranks are reordered for

## UCLA and LA RUG talks on R and C++ integration

April 4, 2010
By

We spent last week in the LA area and had a generally good time out west. I was able to sneak in two talks and a group discussion, thanks to the help by Jan de Leeuw (and everybody at UCLA's Stats department) as well as by Szilard Pafka representing ...

## UCLA and LA RUG talks on R and C++ integration

April 4, 2010
By

We spent last week in the LA area and had a generally good time out west. I was able to sneak in two talks and a group discussion, thanks to the help by Jan de Leeuw (and everybody at UCLA's Stats department) as well as by Szilard Pafka representing th...

## UCLA and LA RUG talks on R and C++ integration

April 4, 2010
By

We spent last week in the LA area and had a generally good time out west. I was able to sneak in two talks and a group discussion, thanks to the help by Jan de Leeuw (and everybody at UCLA's Stats department) as well as by Szilard Pafka representing ...

## Le Monde rank test

April 4, 2010
By
$Le Monde rank test$

In the puzzle found in Le Monde of this weekend, the mathematical object behind the silly story is defined as a pseudo-Spearman rank correlation test statistic, where the difference between the ranks of the paired random variables and is in absolute value instead of being squared as in the Spearman rank test statistic. I don’t

## Why isn’t my 2X Ultra ETF keeping pace with the market and what is path asymmetry (R ex)? Part 2

April 3, 2010
By

I created an example to show how the theory from part 1 might be applied using S&P500 as a proxy for performance. Just in case anyone viewing is not familiar with terminal wealth, it is the final (usually compounded) ending value (hence, terminal) of ...

## R-Node: a web front-end to R with Protovis

April 3, 2010
By

Update (April 6 – 2010) : R-Node now has it’s own a website, with a dedicated google group (you can join it here) * * * * The integration of R into online web services is (for me) one of the more exciting prospects in R’s future. That is way I was very excited coming across Jamie...

## embed images in Rd documents

April 3, 2010
By

The new help system that was introduced in R 2.10.0 and documented in an article of the R journal is very promising. One thing that is planned for future versions of R (maybe 2.12.0) is some way to include images into Rd documents using the fig option of the Sexpr macro Another way is to use data...

## Demonstrating the Power of F Test with gWidgets

April 2, 2010
By

e know the real distribution of the F statistic in linear models — it is a non-central F distribution. Under H0, we have a central F distribution. Given 1 – α, we can compute the probability of (correctly) rejecting H0. I created a simple demo to illustrate how the power changes as other parameters vary,

## Because it’s Friday: Chatroulette

April 2, 2010
By

Yesterday, Drew Conway posted an analysis of the survival time to events on Chatroulette. If you're familiar with Chatroulette, you'll know what kind of events you can expect to occur when using it. (If you're not, here's a hint: don't try it now if you're at work.) Sadly, it was all an April Fool's Day joke. But Drew takes...

## A free book on Geostatistical Mapping with R

April 2, 2010
By

Tomislav Hengl of the University of Amsterdam has published new book, A Practical Guide to Geostatistical Mapping. It's jam-packed with 291 pages on mapping and analyzing spatial data using free software including R, SAGA, GRASS, ILWIS and Google Earth, and freely-available map data. The book itself is also available for free, as an Open Access Publication. You can order...

## How to Produce Fake Data Analysis in R: 3 Easy Steps

April 2, 2010
By

Did you really think that a team of researchers spent their weekends counting the number of shirtless adolescent men and exposed penises they could find on charoulette.com? Perhaps you should not answer that, as it may be a better measure of your opinion of sociologist than gullibility. It is true, sociologist do say the

## CLT Standard Normal Generator

April 2, 2010
By
$CLT Standard Normal Generator$

I’ve found this standard normal random number generator in a number of places, one of which being from one of Paul Wilmott’s books. The idea is that we can use the Central Limit Theorem (CLT) to easily generate values distributed according to a standard normal distribution by using the sum of 12 uniform random

## Lookup Performance in R

April 2, 2010
By

Rumor has it that Joe Adler, author of the O’Reilly Book R in a Nutshell, has joined Linked In as a data scientist.  But that does not keep him from still pumping out some interesting content over at OReilly.com. His latest article is about lookup performance in R. He does a great job giving code