Articles by Andrew Barr

faster for() loops in R

November 13, 2013 | Andrew Barr

One of the most common ways people write for() loops is to create an empty results vector and then concatenate each result with the previous (and growing) results vector, like the following.  (Note: wrapping an expression in the function... [Read more...]

Getting staRted with R.

February 7, 2013 | Andrew Barr

As a PhD student and researcher, I often hear friends and colleagues say that they want to learn R, but that the learning curve is so steep that they can't seem to get started.  It's true that learning any tool as powerful as R can be confusing at... [Read more...]

An R Book for the Rest of Us

October 16, 2012 | Andrew Barr

R for Dummies is here!  Initial reviews are very positive for this book (I haven't gotten it yet).  I am very hopeful though, because the word on the street is that it doesn't assume you have any programming knowledge or much statistical know... [Read more...]

Plot R Data With googleVis

September 30, 2012 | Andrew Barr

Here is a little code snippet that shows how to do two things Use the Google Maps API to resolve place names into lat-long coordinate pairs. Plot R dataframes that contain lat-long data (for example from #1) onto Google Maps for quick visualization using the googleVis package.  The embedded map looks ... [Read more...]

How to customize ggplot2 graphics

March 26, 2012 | Andrew Barr

I consider ggplot2 to be nothing short of a revolution in R graphics. I simply haven't found anything like this package for quickly and elegantly producing usable graphics.  I covered the quick and dirty basics of ggplot2 in a previous post. Now I... [Read more...]

Basic Introduction to ggplot2

March 12, 2012 | Andrew Barr

This is a very basic introduction to the ggplot2 package.  A much more detailed description of the package can be found in this book ggplot2: Elegant Graphics for Data Analysis. On his website (http://had.co.nz/ggplot2/) package author Hadley Wickham describes ggplot2 asa plotting system for R, based ... [Read more...]

Java based GUI for R

March 6, 2012 | Andrew Barr

JGR is a pretty nice Java based GUI for R.  The primary reason I like this is that it is truly cross platform, and will work the same for any operating systemAdded benefits are that some packages like rJava and others tend to break on Mac OSX, but... [Read more...]

Graphical message boxes with R package tcltk

February 29, 2012 | Andrew Barr

Sometimes you just need a graphical messagebox....know what I mean? If only because it pops up in front of all the other open windows and alerts you to the fact that your R script is waiting for you to do something, or is finished doing something el... [Read more...]

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)