Blog Archives

Dallas R Users Group Baseball Data Dive

November 19, 2012
By
Dallas R Users Group Baseball Data Dive

This past Saturday I led a data dive workshop for the Dallas R Users Group using Lahman’s baseball statistics. After providing a brief introduction to the Lahman R package and showing how to load the data and make some basic plots,...

Read more »

Expand delimited columns in R

November 14, 2012
By

A postdoctoral researcher asked me the other day to help him expand a vector of comma delimited values so he could do computations in R with it. I wrote an R function to solve the problem. Here is the before...

Read more »

Reordering factor levels in R plots

November 3, 2012
By
Reordering factor levels in R plots

A few days ago a post doctoral researcher asked me if I could help him reorder the factor levels on a bar chart. The problem is that R automatically alphabetizes factor levels. I thought this would be fairly straight-forward but...

Read more »

R Studio and Revolution R impressions

September 26, 2012
By
R Studio and Revolution R impressions

I have used R for about six years now. Over the years I’ve done the majority of my coding in Linux and so R has been nothing more than a terminal. I enjoy the simplicity and purity of the terminal but...

Read more »

Export R plot to Illustrator or Inkscape

September 6, 2012
By
Export R plot to Illustrator or Inkscape

Have you ever exported an R plot as a PDF and tried to edit it further by importing the PDF into a vector graphics program like Adobe Illustrator or Inkscape? What typically happens is the points on the plot get...

Read more »

Comparing hist() and cut() R functions

August 24, 2012
By

The other day a question about faceting data came up in the Dallas R Users group (link of conversation). The hist() function is more efficient and uses less memory than the cut() function. Additionally, hist() returns an object that makes...

Read more »