Body sizes from Heim et al. 2015

Exercise Type: Implementation

Body size changes (Heim et al. 2015)

You will use a subset of this database to look at body sizes in the marine fossil record.

Instructions

The expected result of a step is indicated in italics at the end of the step.

1. Download the dataset from here: Heim2015_supplementary_data_file.txt. Make sure to put all files relevant to the exercise in a single project directory!

2. Read in this file with the appropriate function (check the separator character and consult ?read.table for options)! Check the structure of the data.frame and ensure that the dataset has been read in correctly. (data.frame)

Every row represents one genus, the fields represent taxonomy (the name of the genus is taxon_name), stratigraphic range endpoints and reference numbers. Body size is recorded with two fields: log10_max_length and log10_volume, which are given as 10-based logarithms of the original measurements (in mm^3 and mm, respectively). To make things easier, use log10_volume as the column representing body size in all subsequent steps!

3. How many different phyla are represented in this database (column: phylum)? (integer value)

4. a. Subset the data to the molluscs! (data.frame) b. How many mollusc classes are there? (integer value) c. Store their names in a vector! (character vector)

5. a. Subset the data to the bivalves! (data.frame) b. Draw a histogram of the body size distributions! (a histogram plot)

Note the characteristics of this distribution: based on its shape, how frequent are large genera compared to small genera?

6. a. Calculate the median body size of bivalves! (numeric) b. How big is the largest bivalve genus in the dataset? (numeric) c. Which bivalve genus is the largest in the data? (character - do you know this genus?)

7. Calculate which is the largest genus and how big it is every mollusc class! (a named character vector and a named numeric vector, the names are the classes) The simplest way to do this is with a for loop. HINT: you can reuse the code you wrote for 4c., 6b and 6c!

Note that this dataset is not complete, and maxima tend to be quite sensitive to sampling, anyway. Which is the largest genus among these, and do you perhaps know even bigger ones?

8. These data were meant to compare avarege tendencies. Make a diagram that shows a series of boxplots, showing the body size distributions of each mollusc class! (you can use ?boxplot to see examples if you don’t remember!) (plot) Based on the plot, which class tends to be the largest?

9. So far we have been only using the log10_volume for measuring the body sizes, but how well does this match length-measurements? Make a scatterplot using all data in the dataset, comparing log10_volume (x axis) and log10_max_length (y axis)! (modify the plot to have the following properties):

parameter property
x axis label expression(Biovolume~(log[10]~mm^3))
y axis label expression(Body~length~(log[10]~mm))
point symbols filled circles
point color transparent dark red (e.g. #66000022)

Note: the x and y axis labels are given as expressions, that allow more extensive formatting (e.g. subscripts and superscripts). All you have to do is to use these as arguments instead of using using character values! You can search web for the different point symbols.


This site uses Just the Docs, a documentation theme for Jekyll.