R in the News

Rplot

So I was reading the latest R journal and there was a reference to an article in the New York Times on R. Here is the link: http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html?_r=1.

This just makes me happy that this great, free, software is finally being given it’s due. I never thought it would happen in this world dominated with Micro$oft mediocrity — in this case, Excel. Now I’ve used Excel a lot and it does some things well, or at least adequately, but until you move from the GUI thinking you really don’t know what you’re missing.

R is an interactive statistical environment that generally has a terminal text interface. And it’s brilliant. Its capabilities are almost endless — if the number and variation of packages are any indication — and once you get past the initial steep learning curve it makes data analysis so fast and easy and deep that you will hate to go back to Excel.

Don’t believe me? Here is a small example:

Problem: Show a histogram of 100 values pulled from a normal distribution with a mean of 10 and a standard deviation of 2.

Excel solution:

1. Open new file

2. Make column of 100 numbers from -4 to 4 (z graph limits).

3. Calculate x values in next column (x=z*std+mean); copy down to fill column.

4. Calculate f(x) using Excel’s NORMDIST function; copy down to fill column.

5. Load Analysis toolpack.

6. Make bins for the histogram.

7. Open data analysis window, choose histogram, input range for data and bins.

8. Open chart wizard, choose column chart.

9. Input data ranges for bins and values.

10. Format data series to reduce gaps between columns.

R solution:

1. Open R.

2. Type: x=rnorm(100,mean=10,sd=2) and hit enter.

3. Type: hist(x, breaks=20, col=”blue”) and hit enter.

Now really, which would you really want to do? And don’t think this is an untypical example just to make R look good; almost everything I need to do can be done better, faster, and more efficiently with R than with spreadsheets.

Give it a try.   http://www.r-project.org

Advertisements
Published in: on July 14, 2009 at 9:35 pm  Leave a Comment  

The URI to TrackBack this entry is: https://badengineering.org/2009/07/14/r-in-the-news/trackback/

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: