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 »

Quick Review of Matrix Algebra in R

December 16, 2009
By

Lately, I’ve been running a series of fMRI experiments on visual perception. In the interests of understanding the underlying properties of the images I’m using as stimuli, I’ve been trying to learn more about the matrix transformations commonly used for image compression and image manipulation. Thankfully, R provides simple-to-use implementations for all of the matrix

Read more »

According to Microsoft, the fourth paradigm of science is data

December 16, 2009
By

In scientific discovery, the first three paradigms were experimental, theoretical and (more recently) computational science. A new book of essays published by Microsoft (and available for free download -- kudos, MS!) argues that a fourth paradigm of scientific discovery is at hand: the analysis of massive data sets. The book is dedicated to the late Microsoft researcher Dr Jim...

Read more »

NCEP Global Forecast System

December 16, 2009
By
NCEP Global Forecast System

Just about everyone is familiar with weather maps. There are many situations where it is useful to combine the underlying numerical weather data with other types of information. Accessing  the weather data is a necessary first step. The output from the U.S. National Centers for Environmental Prediction (NCEP) Global  Forecast System (GFS) is freely available.

Read more »

email yourself when a script or a job is done

December 15, 2009
By

i usually run long simulations in R on a remote server. i’ve read an article on linux journal about emailing yourself after something happens…i forgot. since my jobs are long, and i usually have to run multiple jobs sequentially, it’d be nice to look at my results immediately when they’re gone. good thing *nix based

Read more »

R Site Search with the ‘sos’ Package

December 15, 2009
By

REvolution Computing is a sponsor of the Bay Area R User Group, which gathered on Tuesday for its monthly meeting. This month's meeting was in a cozy setting at San Jose State University, and was hosted by David Czerwinski who teaches data mining there. The topic at hand was search, and finding R packages to compliment the functionality requirements...

Read more »

Browse R Graphics with the R Graph Gallery and the R Graphical Manual

December 15, 2009
By

One of R's biggest strengths is its unparalleled graphing capabilities.  Just see any of our previous posts on ggplot2, visualization, or other posts tagged with R. R has several fundamentally different systems for plotting, including base graphics, lattice, and ggplot2.  Furthermore, many add-on packages come with their own functions for producing problem-domain specific graphics. For example,

Read more »

R Tutorial Series: Graphic Analysis of Regression Assumptions

December 15, 2009
By
R Tutorial Series: Graphic Analysis of Regression Assumptions

An important aspect of regression involves assessing the tenability of the assumptions upon which its analyses are based. This tutorial will explore how R can help one scrutinize the regression assumptions of a model via its residuals plot, normality h...

Read more »

Object-Oriented Programming in R: The Setter Methods

December 14, 2009
By

With a little guidance from the indefatigable Hadley Wickham, I figured out today how to implement the setter methods that were missing from my example user class. To review, let’s rebuild the getter methods for my user object: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Read more »

NYT on breast cancer screening and probability

December 14, 2009
By

The New York Times last weekend looked at the controversy around the recent changes to the mammogram guidelines from a mathematical perspective. Compared to the analysis based on Bayes' Theorem from the Harvard Social Science Statistics blog (which apparently caused some controversy itself: that post was deleted and later replaced after some errors apparently crept into the calculations), this...

Read more »

The Grammar of Graphics: ggplot2 package

December 14, 2009
By

The grammar of graphics approach to constructing graphs has been implemented in the ggplot2 package in R. The author of the package, Hadley Wickham, has provided a website with many details of using the system to create nice looking graphics. The package removes many of the awkward parts of setting up graphical display that characterise other

Read more »

R 2.10.1 released

December 14, 2009
By

The latest update to R, R 2.10.1, is now available for download in source form from your local CRAN mirror. Binary versions (for Mac, Windows, and Linux) will become available over the next few days. As a maintenance release, this update focuses on minor changes and bug fixes. The complete list of changes is available in the NEWS file,...

Read more »

Example 7.18: Displaying missing value categories in a table

December 14, 2009
By
Example 7.18: Displaying missing value categories in a table

When displaying contingency tables (section 2.3.1), there are times when it is useful to either show or hide the missing data category. Both SAS and the typical R command default to displaying the table only for observations where both factors are observed.In this example, we generate some multinomial data (section 1.10.4) and then produce tables with and without...

Read more »

RQuantLib 0.3.1 released

December 13, 2009
By

A new version of RQuantLib is now out at CRAN and in Debian. It updates the package to the 0.9.9 release of QuantLib and is mostly a maintenance release with a few minor fixes along the way. Full changelog details, examples and more details abo...

Read more »

RQuantLib 0.3.1 released

December 13, 2009
By

A new version of RQuantLib is now out at CRAN and in Debian. It updates the package to the 0.9.9 release of QuantLib and is mostly a maintenance release with a few minor fixes along the way. Full changelog details, examples and more details about this...

Read more »

RQuantLib 0.3.1 released

December 13, 2009
By

A new version of RQuantLib is now out at CRAN and in Debian. It updates the package to the 0.9.9 release of QuantLib and is mostly a maintenance release with a few minor fixes along the way. Full changelog details, examples and more details abo...

Read more »

Galton’s quincunx in R

December 13, 2009
By
Galton’s quincunx in R

Andrej Blejec has a very nice R demo of Galton's quincunx (link1, link2). It is a bit tedious to copy the code from PDF to R console, but it is worth the effort as the demo simulation clearly shows the nature of quincunx. After a bit of search I also f...

Read more »

Galton’s quincunx in R

December 13, 2009
By
Galton’s quincunx in R

Andrej Blejec has a very nice R demo of Galton's quincunx (link1, link2). It is a bit tedious to copy the code from PDF to R console, but it is worth the effort as the demo simulation clearly shows the nature of quincunx. After a bit of search I also f...

Read more »

CRU graph yet again (with R)

December 13, 2009
By
CRU graph yet again (with R)

IowaHawk has a excellent article attempting to reproduce the infamous CRU climate graph using OpenOffice: Fables of the Reconstruction. We thought we would show how to produced similarly bad results using R. If the re-constructed technique is close to what was originally done then so many bad moves were taken that you can’t learn much Related posts:

Read more »