R: choose file dialog box

May 6, 2010
By

Needed this one recently, it pops up a window to pick a file to be used by r, then reads the contents into myData: myFile

Read more »

How I came to R

May 6, 2010
By

J. D. Long will be giving an introduction to R - how he got into it when doing data analysis and what drew him to use it instead of complicated excel models.

Read more »

Revolution R Enterprise now free to academics

May 6, 2010
By

Unlike Revolution R Community which is 100% free to everyone, our commercial-grade Revolution R Enterprise distribution bundles R with proprietary components from our development team, which are normally available only to paying subscribers. (Those subscriptions are the way we get income to keep the company going.) Those components include our full ParallelR libraries for parallel programming, enhanced for 64-bit...

Read more »

Exporting R output to MS-Word with R2wd (an example session)

May 6, 2010
By

Creating reports is one of the basic tasks in data analysis. R provides numerous functions and packages to export it’s (beautiful) output and help compile it into a report. In this post I will present one such (basic) solution for Windows OS users for exporting R output into Microsoft Word using the R2wd (package). There are more ways and...

Read more »

REvolution Computing is now Revolution Analytics

May 6, 2010
By

So, as you may have noticed from the new banner here at the blog, we've changed our name to Revolution Analytics. It's still the same company and the same people, and still focused around the R Project, but now with a fresh new look and lots of exciting news. I'll be blogging about our new academic program, our new...

Read more »

R is like Ruby

May 6, 2010
By
R is like Ruby

There are many similarities between R and Ruby. - Learning both has been fun - "dude, i'm playing with R and love it." The excitement doesn't end!I'm totally addicted. - I keep discovering new and nifty things. Every time I hit an interesting pr...

Read more »

Mixed linear model approach adapted for genome-wide association studies

May 6, 2010
By

A few weeks ago I covered an R package for efficient mixed model regression that is capable of simultaneously accounting for both population stratification and relatedness to compute unbiased estimates of standard errors and p-values for genetic associ...

Read more »

Rearranging definitions in R

May 6, 2010
By
Rearranging definitions in R

I came up with a handy little trick for programming in R. I like to define a lot of variables all at once without worrying about what order they’re in. The goal would be something like this: K  = -R2/R1 … Continue reading →

Read more »

Candy branching process

May 5, 2010
By
Candy branching process

The mathematical puzzle in the latest weekend edition of Le Monde is as follows: Two kids are given three boxes of chocolates with a total of 32 pieces. Rather than sharing evenly, they play the following game: Each in turn, they pick one of the three boxes, empty its contents in a jar and pick

Read more »

Game of Life in R

May 5, 2010
By
Game of Life in R

Before I decided to learn R in a serious way, I thought about learning Flash/Actionscript instead. Most of my work involves evolutionary models that take place over time. I need visual representations of change. It’s certainly possible to represent change and tell an evolving story with a single plot (see for example Tufte’s favorite infographic),

Read more »

13 videos for learning R

May 5, 2010
By

Jeromy Anglim has just posted a nice round-up of instructional videos for learning R. The videos are categorized into four levels: What is R? Introductory R? Intermediate and Advanced Materials on R and Related Resources (including a link to written resources for getting started with R). Check out all the links at Jeromy's post, linked below. Jeromy Anglim's blog:...

Read more »

Fun with R: Clustering and MDS

May 5, 2010
By
Fun with R: Clustering and MDS

I've seen K-means clustering, PCA, etc. done some over at Beyond the Boxscore and Baseball Analysts (and the now defunct Statspeak), but I thought I'd just check out some clustering on the young fantasy season using the traditional 5x5 categories with ...

Read more »

Videos on Data Analysis with R: Introductory, Intermediate, and Advanced Resources

May 4, 2010
By

If you want to learn about R through videos, there are now a large number of options. This post provides links to many of these video under the headings of: (a) What is R? (b) Introductory R, and (c) Intermediate and Advanced R. What is R?If you are...

Read more »

Videos on Data Analysis with R: Introductory, Intermediate, and Advanced Resources

May 4, 2010
By
Videos on Data Analysis with R: Introductory, Intermediate, and Advanced Resources

If you want to learn about R through videos, there are now a large number of options.This post provides links to many of these video under the headings of:(a) What is R?(b) Introductory R, and(c) Intermediate and Advanced R.What is R?If you are evaluat...

Read more »

You won, but how much was luck and how much was skill?

May 4, 2010
By
You won, but how much was luck and how much was skill?

In baseball, what are the chances the winner will win again against the same opponent the very next day?

Read more »

Modifying basic plots in R

May 4, 2010
By

Below is a walk-through of some of the basics of customizing plot in R. These are all based on the graphics package that comes in the base installation of R. Let’s start by making a basic plot in R. In the code snippets below, green text behind a...

Read more »

Difficulty with mcsm?

May 4, 2010
By
Difficulty with mcsm?

An email from Keith I got this morning: Professor Robert, I have loaded the mcsm package to windows. The following messages appear in the R console: trying URL 'http://cran.stat.ucla.edu/bin/windows/contrib/2.9/mcsm_1.0.zip' Content type 'application/zip' length 193590 bytes (189 Kb) opened URL downloaded 189 Kb package 'mcsm' successfully unpacked and MD5 sums checked But when I use the

Read more »

Compcache on Ubuntu on Amazon EC2

May 4, 2010
By
Compcache on Ubuntu on Amazon EC2

The following fully-automatic Bash script downloads, compiles, and initializes compcache version 0.6.2 on Ubuntu Karmic Koala (9.10). This script creates two swaps with a maximum of 4GB uncompressed size each. Two swaps are used to take advantage of 2 CPUs (or CPU cores in a multicore CPU). Compcache is a fascinating memory compression system. The

Read more »

R: directing output to file on the fly, output flushing

May 4, 2010
By

To start sending all output to a file, do this: sink("path/to/filename") # Direct all output to file print("Hi there") # Will be printed to file sink() # Turn off buffing to file Related to this I recently had to use: flush.console() This forces your console to print out any buffered content. Doing this will cost time, but if you are running

Read more »

Where do you want an R User Group?

May 4, 2010
By

Wishing there was a local R User's group in your area, but can't find one? New user groups are springing up all the time, but you can kickstart the process by registering interest for a group in your area at meetup.com. As you can see from the map below, there's interest in many places -- your vote could prompt...

Read more »

Developing a user-friendly regular expression function (easyGregexpr)

May 4, 2010
By

In the past few months, I've developed a set of functions for automating model estimation and interpretation using Mplus, an outstanding latent variable modeling program that has unparalleled flexibility for complex models (e.g., factor mixture models). I recently rolled these functions into an R package called MplusAutomation. Because the package focuses on extracting various parameters from text...

Read more »

Developing a user-friendly regular expression function (easyGregexpr)

May 4, 2010
By

In the past few months, I've developed a set of functions for automating model estimation and interpretation using Mplus, an outstanding latent variable modeling program that has unparalleled flexibility for complex models (e.g., factor mixture models). I recently rolled these functions into an R package called MplusAutomation. Because the package focuses on extracting various parameters from text...

Read more »

Virtual Conference: R the Language

May 3, 2010
By
Virtual Conference: R the Language

On Tuesday May 4th at 9:30 PM central, 10:30 eastern, I’ll be giving a live online presentation as part of the Vconf.org open conference series. I’ll be speaking about R and why I started using R a couple years ago. This is NOT going to be a technical presentation but rather an illustration of how

Read more »

Building Scoring and Ranking Systems in R

May 3, 2010
By
Building Scoring and Ranking Systems in R

This guest article was written by author and consultant Tristan Yates (see his bio below). It emphasizes R’s data object manipulation and scoring capabilities via a detailed financial analysis example. Scoring and ranking systems are extremely valuable management tools. They can be used to predict the future, make decisions, and improve behavior – sometimes all The post Building...

Read more »

Building Scoring and Ranking Systems in R

May 3, 2010
By

This guest article was written by author and consultant Tristan Yates (see his bio below). It emphasizes R's data object manipulation and scoring capabilities via a detailed financial analysis example. Scoring and ranking systems are extremely valuabl...

Read more »

Introduction to R, live virtual talk from JD Long tomorrow

May 3, 2010
By

JD Long (of Cerebral Mastication fame) will be giving a live "virtual talk" introducing R: "What it's best at and how you can use it to help you massage data". The talk will be at 7:30PM Pacific time tomorrow, Tuesday May 4. You can register at the link below. vconf.org: Presentation: R The Language

Read more »

First annual R plot replication prize

May 3, 2010
By
First annual R plot replication prize

$100 to the first person who can figure out how I created this plot and replicate it. Some hints: It was done in R. There is only one underlying probability distribution involved (one “rdist()“). Including the “plot” statement, I created this with 3 short lines of code. This is based on a random sampling of unstated size, so

Read more »

Example 7.35: Propensity score matching

May 3, 2010
By
Example 7.35: Propensity score matching

As discussed in example 7.34, it's sometimes preferable to match on propensity scores, rather than adjust for them as a covariate.SASWe use a suite of macros written by Jon Kosanke and Erik Bergstralh at the Mayo Clinic. The dist macro calculates the ...

Read more »

Displaying data using level plots

May 3, 2010
By
Displaying data using level plots

A level plot is a type of graph that is used to display a surface in two rather than three dimensions – the surface is viewed from above as if we were looking straight down and is an alternative to a contour plot – geographic data is an example of where this type of graph

Read more »