R annoyances

March 20, 2010
By

Readers returning to our blog will know that Win-Vector LLC is fairly “pro-R.” You can take that to mean “in favor or R” or “professionally using R” (both statements are true). Some days we really don’t feel that way. Consider the following snippet of R code where we create a list with a single element Related posts:

  1. Read more »

R: remove all objects fromt he current workspace

March 20, 2010
By

rm(list = ls())

Read more »

Package Releases

March 20, 2010
By
Package Releases

I just put a new version of the XML package on the Omegahat repository. There is a new version of the RKML package which handles large datasets much more rapidly. Also, I put a new package named RJSCanvasDevice which implements and R graphics device that creates JavaScript code that can be subsequently display on a

Read more »

R: Backwards for loop

March 20, 2010
By

for (i in 10:1) { print(i) } As easy as that.

Read more »

Because it’s Friday: Kittens, beware Tufte

March 19, 2010
By
Because it’s Friday: Kittens, beware Tufte

Edward Tufte has been a tireless promoter of good infographics, and he's even taken some controversial steps to rid the world of chartjunk. But now he's gone too far: Then again, this chart from the Wall Street Journal could lead anyone to felinicide: What's wrong with a simple bar chart, WSJ? Mark Goetz: My New Wallpaper (via @sarahd23 and...

Read more »

Savage-Dickey [talk]

March 19, 2010
By
Savage-Dickey [talk]

Here are the slides for the Savage-Dickey paradox paper that I gave in San Antonio this morning: (Any suspected coincidence of the first part with earlier talks is for real!) I have tried to spell out as clearly as possible in the second part the issues of version choices that are at the core of

Read more »

Balloon plot using ggplot2

March 19, 2010
By
Balloon plot using ggplot2

Following Tal Galili example and using part of his code, I want to plot the balloonplot you can see here using R and the excellent ggplot2 package by Hadley Wickham.

### I retrieve the data from the google document you can find here using Tal Galili code:
## I slightly modified Tal code to include popularity...

Read more »

Balloon plot using ggplot2

March 19, 2010
By
Balloon plot using ggplot2

Following Tal Galili example and using part of his code, I want to plot the balloonplot you can see here using R and the excellent ggplot2 package by Hadley Wickham.

### I retrieve the data from the google document you can find here using Tal Galili code:
## I slightly modified Tal code to include popularity...

Read more »

Senators’ ideal points against Obama vote

March 18, 2010
By
Senators’ ideal points against Obama vote

I added another plot to the output generated by my overnight ideal point scripts: a scatterplot of estimated Senate ideal points against Obama vote share in their state (color coded by party, local linear regression overlays by party, labels for some big residuals). I suppose I’m surprised by the way that the loess curve for

Read more »

R Project selected for the Google Summer of Code 2010

March 18, 2010
By

Earlier today, Google announced the list of accepted mentor organizations for the Google Summer of Code 2010 (GSoC 2010). And we are happy to report that the R Project is once again a participating organization (and now for the third straight year) jo...

Read more »

R Project selected for the Google Summer of Code 2010

March 18, 2010
By

Earlier today, Google announced the list of accepted mentor organizations for the Google Summer of Code 2010 (GSoC 2010). And we are happy to report that the R Project is once again a participating organization (and now for the third straight year) joi...

Read more »

R Project selected for the Google Summer of Code 2010

March 18, 2010
By

Earlier today, Google announced the list of accepted mentor organizations for the Google Summer of Code 2010 (GSoC 2010). And we are happy to report that the R Project is once again a participating organization (and now for the third straight year) jo...

Read more »

Create annotated GWAS manhattan plots using ggplot2 in R

March 18, 2010
By

A few months ago I showed you in this post how to use some code I wrote to produce manhattan plots in R using ggplot2. The qqman() function I described in the previous post actually calls another function, manhattan(), which has a few options you can s...

Read more »

Webinar: High-Performance Analytics with R and Microsoft HPC Server

March 18, 2010
By

On April 14 I'll be giving a new webinar in partnership with Microsoft on High-Performance Computing with R. I'll be focusing on the new parallel programming capabilities of REvolution R Enterprise 3.1 for Windows, and how to use the features of Microsoft HPC Server to enable computing on clusters. Here's the complete agenda, and you can register at the...

Read more »

Course in San Antonio, Texas

March 18, 2010
By
Course in San Antonio, Texas

Yesterday, I gave my short (3 hours) introduction to computational Bayesian statistics to a group of 25-30 highly motivated students. I managed to cover “only” the first three chapters, as I included some material on Bayes factor approximation and only barely reached Metropolis-Hastings. Here are the slides, modified from the original Bayesian Core slides: (It

Read more »

O’Reilly at OSBC: The future’s in the data

March 17, 2010
By

Tim O'Reilly's keynote talk at OSBC this evening was thought-provoking to say the least. The title of the talk was "The Real Open Source Opportunity", and the surprise for me was that he wasn't talking about Open Source software. Tim's insight, and it's a profound one, is that the next frontier for freedom and openness -- and indeed, the...

Read more »

Tools

March 17, 2010
By
Tools

All the tools I am using at the moment are free of charge. The one that comes to mind first is R. It’s a language for statistical computing which comes with a decent GUI. R comes with some time series support out of the box, but there are plenty of packages (R extensions are called

Read more »

Vanilla Rao-Blackwellisation for revision

March 17, 2010
By
Vanilla Rao-Blackwellisation for revision

The vanilla Rao-Blackwellisation paper with Randal Douc that had been resubmitted to the Annals of Statistics is now back for a revision, with quite encouraging comments: The paper has been reviewed by two referees both of whom comment on the clear exposition and the novelty of the results. Both referees point to the empirical results

Read more »

OSBC blogging

March 17, 2010
By

I'm at the Open Source Business Conference in San Francisco today and tomorrow; I'll report in with updates after the talks. I'm particularly looking forward to the panel discussion on The Shifting Open Source Opportunity moderated by Ashlee Vance, the New York Times reporter who wrote the major story on R last year. (Interesting aside: I learned recently that...

Read more »

Measuring the length of time to run a function

March 17, 2010
By
Measuring the length of time to run a function

This post describes how to time the run time of a R function.

Read more »

Omegahat Statistical Computing » R 2010-03-16 19:28:40

March 16, 2010
By
Omegahat Statistical Computing » R 2010-03-16 19:28:40

Hin-Tak Leung mailed me about a problem with certain malformed XML documents from FlowJo. There are namespace prefixes (prfx:nodeName) with no corresponding namespace declarations (xmlns:prefix=”uri”). How do we fix these? Well, the XML parser can read this but raises errors. We can do nice things to catch these errors and then post-process them. Then we

Read more »

Measuring the length of time to run a function

March 16, 2010
By

When writing R code it is useful to be able to assess the amount of time that a particular function takes to run. We might be interested in measuring the increase in time required by our function as the size of the data increases. To illustrate using the system.time function to calculate the time taken to

Read more »

Interrupting R processes in Ubuntu

March 16, 2010
By

It's funny how things happen. Yesterday I was working away on a project in R and the unenjoyable happens---the process hangs for longer than desired. I operate R in the standard GNOME terminal in Ubuntu and the only way I knew was to close the entire a...

Read more »

Interrupting R processes in Ubuntu

March 16, 2010
By

It's funny how things happen. Yesterday I was working away on a project in R and the unenjoyable happens---the process hangs for longer than desired. I operate R in the standard GNOME terminal in Ubuntu and the only way I knew was to close the entire a...

Read more »

Validating credit card numbers in SAS

March 16, 2010
By
Validating credit card numbers in SAS

Major credit card issuing networks (including Visa, MasterCard, Discover, and American Express) allow simple credit card number validation using the Luhn Algorithm (also called the “modulus 10″ or “mod 10″ algorithm). The following code demonstrates an implementation in SAS. The code also validates the credit card number by length and by checking against a short

Read more »

In search of a random gamma variate…

March 16, 2010
By
In search of a random gamma variate…

One of the most common exersices given to Statistical Computing,Simulation or relevant classes is the generation of random numbers from a gamma distribution. At first this might seem straightforward in terms of the lifesaving relation that exponential and gamma random variables share. So, it’s easy to get a gamma random variate using the fact that

Read more »

Nutritional supplements, ranked

March 16, 2010
By
Nutritional supplements, ranked

One of my favourite shows on TV right now is The Big Bang Theory. For those who haven't seen it: it's like Friends, except instead of New York yuppies, it's PhD physicists and engineers at CalTech. It's nice to see geeks and smart people be the focus (rather than the comic relief) of a sitcom. Also, the equations on...

Read more »

DICOM-to-NIfTI Conversion

March 16, 2010
By
DICOM-to-NIfTI Conversion

Now that the two packages oro.dicom and oro.nifti have been released, we can put them together and perform the much sought after conversion from DICOM format to NIfTI format (entirely in R).  Why?  Because DICOM is the international "standard" for medical imaging data coming off the scanners, but it's not the easiest thing to manipulate on...

Read more »

DICOM-to-NIfTI Conversion

March 16, 2010
By
DICOM-to-NIfTI Conversion

Now that the two packages oro.dicom and oro.nifti have been released, we can put them together and perform the much sought after conversion from DICOM format to NIfTI format (entirely in R).  Why?  Because DICOM is the international "standard" for medical imaging data coming off the scanners, but it's not the easiest thing to manipulate on...

Read more »

Contributing Blogs