tutorial

Pivot tables in R

January 9, 2010 | Chris

A common data-munging operation is to compute cross tabulations of measurements by categories. SQL Server and Excel have a nice feature called pivot tables for this purpose. Here we'll figure out how to do pivot operations in R.Let's imagine an experim...
[Read more...]

R Tutorial Series: ANOVA Tables

January 8, 2010 | John M. Quick

The commonly applied analysis of variance procedure, or ANOVA, is a breeze to conduct in R. This tutorial will explore how R can be used to perform ANOVA to analyze a single regression model and to compare multiple models.Tutorial FilesBefore we begin,...
[Read more...]

SQL group by in R

December 27, 2009 | Chris

The R statistical computing environment is awesome, but weird. How to do database operations in R is a common source of questions. The other day I was looking for an equivalent to SQL group by for R data frames. You need this to compute summary statist...
[Read more...]

Plot ROC curve and lift chart in R

December 18, 2009 | heuristicandrew

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...]

Joining data frames in R

December 17, 2009 | Chris

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 ...
[Read more...]

R Tutorial Series: Simple Linear Regression

November 26, 2009 | John M. Quick

Simple linear regression uses a solitary independent variable to predict the outcome of a dependent variable. By understanding this, the most basic form of regression, numerous complex modeling techniques can be learned. This tutorial will explore how ...
[Read more...]

R examine objects tutorial

November 21, 2009 | John Mount

This article is quick concrete example of how to use the techniques from Survive R to lower the steepness of The R Project for Statistical Computing‘s learning curve (so an apology to all readers who are not interested in R). What follows is for people who already use R ... [Read more...]

R Tutorial Series: Scatterplots

November 12, 2009 | John M. Quick

A scatterplot is a useful way to visualize the relationship between two variables. Similar to correlations, scatterplots are often used to make initial diagnoses before any statistical analyses are conducted. This tutorial will explore the ways in whic...
[Read more...]

R Tutorial Series: Zero-Order Correlations

November 6, 2009 | John M. Quick

One of the most common and basic techniques for analyzing the relationships between variables is zero-order correlation. This tutorial will explore the ways in which R can be used to employ this method.Tutorial FilesBefore we start, you may want to dow...
[Read more...]

Delete rows from R data frame

October 8, 2009 | heuristicandrew

Deleting rows from a data frame in R is easy by combining simple operations. Let’s say you are working with the built-in data set airquality and need to remove rows where the ozona is NA (also called null, blank or missing). The method is a conce... [Read more...]

R String processing

July 2, 2009 | Chris

Here's a little vignette of data munging using the regular expression facilities of R (aka the R-project for statistical computing). Let's say I have a vector of strings that looks like this:__ coords [1] "chromosome+:157470-158370" "chromosome+:1583...
[Read more...]

How to plot a graph in R

June 2, 2009 | Chris

Here's a quick tutorial on how to get a nice looking graph out of R (aka the R Project for Statistical Computing). Don't forget that help for any R command can be displayed by typing the question mark followed by the command. For example, to see help o...
[Read more...]
1 2 3

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)