Exercise 4


Data

In this exercise, we will use a classic dataset adapted from Theriot et al. (2006) and Hunt et al. (2026). The dataset consists of trait measurements from the diatom Stephanodiscus yellowstonensis, which is endemic to Yellowstone Lake, Wyoming, USA. The phenotypic time series contains 58 samples and covers approximately 13 500 years. For most samples, 50 individuals are measured (occasionally fewer; Hunt et al. 2026). The measured traits on each individual are valve diameter ($\mu m$), the number of costae per valve, and the number of spines per valve. The ecological importance of valve spines is believed to be improvement of nutrient uptake and photosynthetic rate by affecting how diatoms sink through the water column. The size of diatoms (valve diameter) affects growth rate and harvesting of light and nutrients. The costae (ribs) absorb external pressures and help avoid deformation when the diatoms are being predated (Voje 2020). The environmental variable is the proportion of the dominant pollen type (from Pinus contortus) used as a proxy for floral change in the area (and also change in climate) Theriot et al. (2006).

Download the data by clicking the links: spines, costae (ribs), valve diameter, and pollen abundance.

Place the files in your working directory.

Import and prepare data in R

Import the text files and get them into the correct format, the same way you did in exercise 3. Make different multivariate evoTS datasets combining the various variables. You could for example make a dataset with the number of spines and ribs together with the pollen data, like this:

Import the data:

spines <- read_delim("./spines.txt", col_names = TRUE, delim = "\t")
ribs <- read_delim("./ribs.txt", col_names = TRUE, delim = "\t") 
pollen <- read_delim("./pollen_abundance.txt", col_names = TRUE, delim = "\t")

Make a list with the data:

data <- list()
data$spines <- as.list(spines)
data$ribs <- as.list(ribs)
data$pollen <- as.list(pollen)

Transform the data into a paleoTS object, log-transform the data, and convert the time vector to relative time:

paleoTS_data <- lapply(data, function(x) {
  paleoTS::as.paleoTS(mm = x$trait_mean, vv = x$trait_var, nn = x$N, tt = x$age_MY, oldest = "first")
})

ln_data <- lapply(paleoTS_data, paleoTS::ln.paleoTS)

ln_data <- lapply(ln_data, function(x) {
  x$tt <- x$tt/(max(x$tt))
  x
})

Make a multivariate evoTS object:

evoTS_data <- make.multivar.evoTS(ln_data$spines, ln_data$ribs, ln_data$pollen)

Analyses and questions

Use what you have learned in the tutorial to explore the data.

Suggestions for questions to think about:


That was the last exercise. Thank you for taking part! If you want to read more, have a look at the references.