Category: R-project
-
Plotting stuff on an image
Recently, I needed to figure out how many extension cords I was going to need to buy in order to reach parts of my field site. Wandering around in the field with a surveyor’s tape was an option, but so was plotting distances on an aerial image I had of my site. What follows is a brief walk through of how I plotted stuff on top of my image in R.
-
Eclipse and StatET 2.0 Install For Running R
The Eclipse IDE with StatET plugin, developed by Stephen Wahlbrink, is one of the more (maybe the most) full-featured options for running R. I’ve written about this combination before (previous post), but the highlights include a script editor with syntax highlighting, code completion, an integrated graphics window, an advanced debug system, and the best object […]
-
Loading OSU’s VGPM ocean productivity data in R
Oregon State University makes a set of ocean productivity data derived from satellite data available for download and use by researchers. The Ocean Productivity website explains the available data and how it was derived. I have put together a few R functions to open a subset of the available data files and plot the data. […]
-
A simple ggplot2 scatterplot revisited
Rick Wicklin contacted me with a helpful suggestion for improving the data presentation method outlined in my previous post on using ggplot2 to visualize some data. In the previous post I had plotted up a highly correlated set of points, showing the correspondence between maximum daily body temperatures of model snails sitting with the foot […]
-
A simple ggplot2 scatterplot
Here’s a bit of code used to produce one of the figures in my recent paper dealing with modeling rocky intertidal snail body temperatures. This was my first foray into ggplot2, and it only involved a few hours of head-scratching. The plot is a comparison of 10 years of daily maximum body temperatures of a […]
-
Digitizing data from old plots using ‘digitize’
The June 2011 issue of The R Journal contains an article on the R package digitize (link to pdf) by Timothée Poisot. This might prove to be a handy tool if you occasionally find yourself needing to retrieve data points from figures in old articles for which you don’t have the raw data. There are […]
-
One minor detail for getting 64-bit R-2.13 running with Eclipse/StatET
Upgrading from R-2.12 to R-2.13 was fairly painless, except for one minor hiccup in trying to get the 64-bit version running on my installation of Eclipse + StatET under Windows 7. The setup instructions are almost entirely the same as I have outlined previously (R 2.12.0 and Eclipse with StatET installation). But when you go […]
-
Extracting sea surface temperatures from NOAA’s OISSTv2
Update, 2015-11-30 It appears that NOAA has gone through and upgraded all of the OISST files to the newer version of the NetCDF file format. As a result, the functions outlined in this post don’t work any longer. Instead, see the updated functions in my newer post, https://lukemiller.org/index.php/2014/11/extracting-noaa-sea-surface-temperatures-with-ncdf4/. The concepts are the same as described […]
-
RStudio – another integrated development environment for R
If you’re in the market for a very easy-to-setup integrated development environment for R, wander over to RStudio.org. They’ve just released a beta version of their freely-available front end for R that runs under Windows, Linux and Mac OS X (for R versions 2.11 and later). If you’re not familiar with the idea of an […]
-
Converting MATLAB and R date and time values
For some unknown reason, MATLAB codes its date/time values as the number of elapsed days starting from January 1 in the year 0000. R uses the equally arbitrary, but much more widespread POSIX/Unix epoch as a reference for time keeping, so that R’s POSIX time values are stored internally as the elapsed seconds since 00:00 […]