Currently Browsing: R

Equality of Covariances Matrices Test in R (varcomp)

This is a piece of code I implemented in 2004, which was supposed to be part of an R-package in multivariate testing (to be named, rather creatively, mvttests). Time has flown, I haven’t still got around to implementing the said package, but people keep asking me for the varcomp function, so here it...

Sphericity Test for Covariance Matrices in R (sphericity.test)

This is a piece of code I implemented in 2004, which was supposed to be part of an R-package in multivariate testing (to be named, rather creatively, mvttests). Time has flown, I haven’t still got around to implementing the said package, but people keep asking me for the sphericity.test function, so...

R2HTML Package

Update: I maintained R2HTML from the original pub date of this post (2005) up until version 1.59, but no longer maintain it. Maintenance is now back to the author of the package (Eric Lecoutre). Keeping this page just for posterity. Introduction R2HTML is an R package, written and maintained by Eric...

Multiple Assignments or the Idiosyncrasies of R and SAS

Working on top of someone else’s code at work a couple of weeks ago I stumbled upon a piece of SAS code that went like this: View Code SAS1 2 3 length check 3; ... check = Name = 'Netter' Being raised in the land of open-source and having programmed in R since I was in college, that struck me...

Sweave Syntax Highlighting in vim

If you use Sweave and vim, you might have wondered if it’s possible to have it syntax highlight Rnw/Snw files properly : the latex bits with LaTeX syntax and the noweb R chunks with R syntax. It is! Take a look a the screenshot below: In order to have this working, you only need to properly configure...

R Screenshot and Fan Photo

Personal website

R-Project: Translation Status

Introduction This page was originally set up to shows statistics of the current status of the translation of messages for the R-project. The statistics can be generated with a Perl script that wrote for this: rt_status.pl I had put this info here in order to help the Translation Teams coordinate efforts and...

Creating shaded areas in R

Sometimes we want to shade areas under a density on a graphic, for instance to illustrate a p-value or a region under the normal curve. Using the polygon() function from base R we can make graphics like the following one: How to do it First we have to plot the graphic of the function whose areas we are going...