Publications by Amy Whitehead
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 do it in Excel. But I like to make sure that my manipulations are reproducible. 1. This helps me remember what I actually did and 2....
3692 sym R (1805 sym/4 pcs) 6 img
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 obscure names which can make the smoodging process quite difficult. For examp...
2204 sym R (1984 sym/2 pcs) 4 img
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. One of the tasks that I need to do is to convert presence-only latitude and longitude data into a presence-absence ...
2503 sym R (1133 sym/2 pcs) 6 img
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 own right. Manually deleting such temporary files can be a very time consuming an...
3163 sym R (134 sym/1 pcs) 6 img
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 to a raster in a standardised format. Preferably with as little repetitive coding as possible. So I created ...
4576 sym R (3048 sym/5 pcs) 12 img
Copying files with R
Following on from my recent experience with deleting files using R, I found myself needing to copy a large number of raster files from a folder on my computer to a USB drive so that I could post them to a colleague (yes, snail mail – how old and antiquated!). While this is not typically a difficult task to do manually, I didn’t want to copy...
2293 sym R (294 sym/1 pcs) 4 img