Publications by Bluecology blog

R workshops Brisbane February 2023

09.10.2022

R workshops Brisbane February 2023 Hands-on R training! February 14th-17th 2023 Presenters Professor Anthony J. Richardson (UQ CARM) Professor David Schoeman (University Sunshine Coast) Associate Professor Chris Brown (Griffith University) Dr Christina Buelow (Griffith University) Click links below to register with the University of Queensland. I...

1697 sym

Create an inset plot

10.10.2016

How to inset a plot on another plot in R The difficulty of plotting one plot over the top of another in R has always frustrated me. I often end up opening some photo editing software (like Gimp, which is free) and doing it manually. However, manual editing can be frustrating if you need to change the plot. A histogram with a boxplot inset I j...

1256 sym R (134 sym/4 pcs) 2 img

A ‘tidyverse’ approach to simulation models

27.10.2016

A ‘tidyverse’ approach to simulation models I am a big fan of Rstudio’s (mainly led by Hadley Wickham) series of R packages known as the ‘tidyverse’. The packages modernise much of R’s functionality to better deal with moderately large databases and programming. There is even a tidyverse package now, so you can hit up all their packa...

3461 sym R (981 sym/9 pcs) 4 img

Extracting exif data from photos using R

13.11.2016

Part 1: Extracting exif data from photos using R See the other parts in this series of blog posts. My camera comes with an inbuilt GPS allowing you to geo-reference photos you take. Here is a simple example for how we can use this feature to create an interactive web map in R. The photos come from a survey I did of oysters on a rocky shoreline. I...

1883 sym R (394 sym/5 pcs)

From geotagged photos to species distribution models

13.11.2016

From geotagged photos to species distribution models My camera comes with an inbuilt GPS allowing you to geotag photos. I was on a family holiday on the beautiful Hornby Island (near Vancouver) and started wondering why the oysters growing on the rocks were so patchy in their distribution. This observation motivated me to get out and count oyster...

1313 sym

Create an interactive web map with geotagged photos

22.11.2016

Part 2: Create an interactive web map with geotagged photos See the other parts in this series of blog posts. In part 1 we looked at making a simple interactive map using locations from our geotagged photos. Those photos have data associated with them (counts of oysters in quadrats) so here we will look at how you would plot that data on your map...

6606 sym R (2489 sym/17 pcs)

Part 3: Spatial analysis of geotagged data

21.02.2017

Part 3: Spatial analysis of geotagged data See the other parts in this series of blog posts. In parts 1 and 2 we extracted spatial coordinates from our photos and then made an interactive web map that included data associate with those photos. Here I describe how we can build a spatial statistical model to interpolate to unmeasured locations. Her...

4797 sym R (2837 sym/11 pcs) 8 img

Make your R simulation models 20 times faster

27.02.2017

Make your R simulation models 20 times faster R can be frustratingly slow if you use its loops. However, you can speed it up significantly (e.g. 20 times!) using the Rcpp package. That could turn a day long simulation into an hour long simulation. I had heard years ago about the Rcpp package. Rcpp lets you write and use C ++ functions in R. Howev...

5558 sym R (2069 sym/8 pcs) 4 img

Mean trophic levels of a genera from FishBase

22.03.2017

Mean trophic levels of a genera from FishBase How would you selectively aggregate observations using R? For instance, say you have a table of trophic level estimates by fish species, but many species are missing values. For those species missing a value, you want to assign them the mean for their genus. I recently saw a post from Trevor Branch sa...

3233 sym R (2236 sym/7 pcs) 2 img

A fast method to add annotations to a plot

28.03.2017

A fast method to add annotations to a plot Making professional looking plots in R can be fiddly. One task that I often spend ages doing is manually finding coordinates to add labels. Wouldn’t it be nice if you could just send the coordinates directly to your text editor? I did some searching and found on stackoverflow that you can send R object...

1592 sym R (335 sym/4 pcs) 2 img