Blog Archives

Loading all installed R packages

December 10, 2012
By

The other day I was trying to set up an R for Windows installation on a USB drive. As I don't have a Windows machine, I had to use the university computer to do this task. However, for some reason, they've blocked R from downloading and installing pack...

Read more »

SPIDER makes the top 10 barcoding publications of 2012

October 7, 2012
By
SPIDER makes the top 10 barcoding publications of 2012

In the recent Barcode Bulletin published by iBoL, our humble paper announcing the R package spider: Species identity and evolution made second on their list of the top 10 publications of 2012. Not bad for a side project! Spider is available for downl...

Read more »

An R function for finding coordinates of NZ localities

June 10, 2012
By

Over the course of my PhD, I will be doing a fair amount of georeferencing. This involves obtaining geographic coordinates for localities where weevil specimens have been collected. When I'm the one who has collected them, this is fairly straightforward—Google Maps has made obtaining coordinates a breeze. When it's a museum specimen, however, things get a little tricky....

Read more »

Alternate way of plotting means and errors

May 20, 2012
By
Alternate way of plotting means and errors

Last month, I wrote a post discussing dynamite plots, noting that they're not considered to be especially good at presenting information. I got a little bit of flak for it, from people for and against dynamite plots. This post shows a different method of showing a point and an error bar. If you're going to do it, why...

Read more »

PhD week 7: Plotting and NIR spectroscopy

April 19, 2012
By
PhD week 7: Plotting and NIR spectroscopy

Near-infrared (NIR) spectroscopy is a technique that measures the amount of heat absorbed or emitted by certain materials. It is used in a variety of applications, but in the agricultural world, it is often used to determine the quality and composition of mixed materials such as stock forage. It uses electromagnetic radiation...

Read more »

Dynamite plots in R

April 6, 2012
By
Dynamite plots in R

For some time I've contemplated creating a function for creating the dynamite plots beloved by many of the applied sciences. There's a lot of criticism regarding their utility, and there are several ways that present data in a more intelligible way. A search on the subject brings up pages with such emotive titles as "Dynamite plots: unmitigated evil?"...

Read more »

Interactive function for distances in plots

March 11, 2012
By

The following R function returns the distance between two points located on a plot. The distance returned is in the same units as that of the plot.interDist     aa     dx     dy     sqrt(sum(c(dx^2, dy^2)))}

Read more »

spider: an R package for species identity and evolution

December 12, 2011
By
spider: an R package for species identity and evolution

spider: Species identity and evolution is an R package developed by the Lincoln University molecular ecology lab group to do a range of analyses that various lab members wanted to run that were not yet implemented in R. In particular, the package provi...

Read more »

Using Sweave with Beamer: A note on fonts

November 2, 2011
By

Recently, I've been preparing a poster using the LaTeX packages Beamer and beamerposter. The poster discusses a bunch of R stuff that I've been doing lately, so I successfully used Sweave to incorporate R code into the poster. However, I had some troub...

Read more »

Alternately coloured line environment with fancyvrb

September 11, 2011
By

Recently, while typing up an R tutorial, I used the LaTeX fancyvrb package to create two environments—one coloured blue for R commands, and one coloured red to display R output. This worked well for large blocks of each type. Then I decided I wan...

Read more »