Blog Archives

Converting shapefiles to rasters in R

May 1, 2014
By
Converting shapefiles to rasters in R

I’ve been doing a lot of analyses recently that need rasters representing features in the landscape. In most cases, these data have been supplied as shapefiles, so I needed to quickly extract parts of a shapefile dataset and convert them … Continue reading →

Read more »

Remotely deleting files from R

February 23, 2014
By
Remotely deleting files from R

Sometimes programs generate a LOT of files while running scripts. Usually these are important (why else would you be running the script?). However, sometimes scripts generate mountains of temporary files to create summary outputs that aren’t really useful in their … Continue reading →

Read more »

Creating a presence-absence raster from point data

May 27, 2013
By
Creating a presence-absence raster from point data

I’m working on generating species distribution models at the moment for a few hundred species. Which means that I’m trying to automate as many steps as possible in R to avoid having to click buttons hundreds of times in ArcView. … Continue reading →

Read more »

Combining dataframes when the columns don’t match

May 13, 2013
By
Combining dataframes when the columns don’t match

Most of my work recently has involved downloading large datasets of species occurrences from online databases and attempting to smoodge1 them together to create distribution maps for parts of Australia. Online databases typically have a ridiculous number of columns with … Continue reading →

Read more »

Randomly deleting duplicate rows from a dataframe

January 22, 2013
By
Randomly deleting duplicate rows from a dataframe

I use R a lot in my day to day workflow, particularly for manipulating raw data files into a format that can be used for analysis. This is often a brain-taxing exercise and, sometimes, it would be totally quicker to … Continue reading →

Read more »