Blog Archives

NOAA OISST v2 High Resolution daily sea surface temperatures with R

January 13, 2014
By

The National Ocean and Atmospheric Administration generates freely-available world-wide estimates of mean daily sea surface temperature, and has been doing so back to 1981. The data are on a 0.25 x 0.25 degree grid, and provide an interpolated estimate of the sea surface temperature for each day of the year, based on a mix of

Read more »

Make your R figures legible in Powerpoint/Keynote presentations

January 12, 2014
By

Having just returned from the SICB 2014 meetings, the appearance of many people’s Powerpoint figures is fresh on my mind. The sheer number of tiny figure labels (tick marks, axis titles, legend text etc) is disappointing. If we want to point fingers, MATLAB users are clearly the worst offenders because of the microscopic default label

Read more »

Part 2: Make your R figures legible in Powerpoint/Keynote presentations

January 2, 2014
By

In the previous post, I outlined some tips for increasing the size of figure labels for figures that are meant to be displayed on a projector. The previous post used the base R plot() function, but the procedure when plotting with ggplot2 is different and usually quite a bit simpler than the stock R plotting

Read more »

More tide prediction with R

May 19, 2013
By

In the previous post I outlined how to query the XTide software with R and parse the results into a handy-dandy data frame. The biggest hurdle with that method is getting XTide up and running on your computer. The code outlined here works entirely within R, so you don’t need XTide installed on your computer.

Read more »

Interfacing XTide and R

May 17, 2013
By

XTide is an open-source program that predicts tide heights and current speeds for hundreds of tide and current stations around the United States. It can be used to produce tide predictions in the past and future for a site at your chosen interval (down...

Read more »

Book Review: The R Book, Second Edition (2013)

May 1, 2013
By

The first edition of The R Book by Michael J. Crawley was an ambitious work, but managed to be slightly rubbish due to the atrocious typographical layout of the original book. The good news is that the new 2nd edition, released in 2013, has a substanti...

Read more »

Generating polygon boundaries for plotting simple time series data with missing data

December 19, 2012
By

Every so often I want to plot some data with pretty upper and lower error bounds, such as temperature data through time, perhaps with the maximum and minimum temperature range or standard error bounds for averaged data. The polygon( ) function can make those sorts of pretty plots. However, I’ll often have chunks of missing

Read more »

The new definitive guide for setting up Eclipse, StatET, and R on Windows 7

November 17, 2012
By

Quite a while back I wrote some tutorials on getting the StatET plugin for Eclipse running, so that you can write R code and run it within the Eclipse development environment. The developers of all of these pieces of software have kept marching on with...

Read more »

Adding p values and R squared values to a plot using expression()

October 17, 2012
By

I was fooling around with including a p-value and R2 value on a plot I was putting together, and found myself quickly descending into the world of R graphics esoterica. I wanted to be able to include the values on the fly using values extracted from a ...

Read more »

Another R + iButton script

October 8, 2012
By

Previously I’ve detailed R scripts that automate the launching and downloading Maxim iButton thermochron data loggers. I’m typically doing the launching and downloading at separate times in my workflow, since I have duplicate iButtons to swap out, so separate scripts work for me. Ryan Knowles recently contributed a combined version of these scripts that downloads

Read more »