Publications by Bluecology blog

How much has the data informed your isotope mixing model

24.04.2020

How much has the data informed your isotope mixing model? The contributions of different food sources to animal diets is often a mystery. Isotopes provide a means to estimate those contributions, because different food sources often have different isotopic signatures. We would typically use a Bayesian mixing model to estimate the proportional con...

8379 sym R (4650 sym/12 pcs) 6 img

Time sinks for data wrangling

30.04.2020

Time sinks for data wrangling Estimating the time it will take to complete a project is an important part of being a successful PhD student, researcher or consultant. A major time sink on many analytical projects is data wrangling. Often the wrangling can take longer than the analysis. Here’s some good questions to ask yourself and your collabo...

5408 sym

Universal inference in R

08.07.2020

Universal inference in R When we perform a statistical test we’d like to have confidence what the Type I error rate is what we say it is (rate of false positive findings). Often scientists choose a rate (AKA ‘alpha’) of 0.05 for rejecting the null hypothesis. We’d like some guarantees that our statistical test will actually have a type I ...

4208 sym R (2235 sym/11 pcs)

Correcting for confounded variables with GLMs

03.09.2020

Correcting for confounded variables with GLMs General (and generalized) linear models can be useful for analyzing field data, where sampling is often distributed unevenly across different environmental gradients or treatment groups. They help us correct for confounded gradients and discover effects that are hidden in plots of raw data. For instan...

4811 sym R (2266 sym/12 pcs) 10 img

New course on preparation and graphing of biological data in R

28.09.2020

New course on preparation and graphing of biological data in R We’re running a short online introduction to data preparation and graphing. The course will cover the basics of pre-processing data, including common data wrangling routines. We will use real world data from the Reef Life Survey to demonstrate these tools and calculate some common s...

2707 sym

R workshops in Brisbane 2021

25.10.2020

R workshops in Brisbane 2021 Our annual series of popular R workshops is on again between 5th and 12th February 2021, in person at the University of Queensland. Over the past 5 years we’ve successfully trained hundreds of academics, researchers and students. There are 4 courses that range from introductory to advanced and focus on applications...

1232 sym

Fast functions with pipes

28.12.2020

Fast functions with pipes Pipes are becoming popular R syntax, because they help make code more readable and can speed up coding. You can even use pipes to create functions. This is handy if you want to repeat a piped process for several different datasets. Trivial example Let’s start with a trivial example. You can access pipes through the tid...

2618 sym R (1182 sym/6 pcs) 4 img

How to solve common problems with GAMs

26.03.2021

How to solve common problems with GAMs Here I’ll provide solutions to some common problems I run into when fitting GAMs with mgcv and ways to solve them. The four problems are: Categorical variables should be input to gam() as factors Adjust the degrees of freedom parameter to avoid an error involving the maximum degrees of freedom Use the R...

5877 sym R (1335 sym/12 pcs) 16 img

When interpolation doesn’t work with GAMs

26.03.2021

When interpolation doesn’t work with GAMs GAMs shouldn’t be used for extrapolation, and they can give strange results for interpolation too. Here I’ll explain why and we’ll look at a solution that involves changing the order a smoother’s penalty. Gaps in an x-covariate, such as gaps in a time-series, can be a problem to deal with if you...

3794 sym 4 img

A comparison of terra and raster packages

27.05.2021

A comparison of terra and raster packages The terra package looks designed to replace an old favourite raster. It is made by a similar team. The terra documentation states “can do more, is simpler to use, and it is faster.” So should you make the switch to terra? I’ll answer that here. TLDR: terra is simpler and faster than raster and will ...

3774 sym R (1039 sym/5 pcs) 6 img