Skip to contents

The goal of UFSCarISD is to provide a tutorial on using the sizeSpectra package by Andrew Edwards. This package was developed in order to make a website using pkgdown. The website is a collection of resources for a workshop.

Workshop Details:

Facilitator: Justin Pomeranz, PhD. Assistant Professor of Environmental Sciences & Technology at Colorado Mesa University

Date: Saturday, July 6, 2024

Time: 9 AM to 5 PM

Location: Integrated Research Unit for Tropical Biodiversity (BIOTROP), Federal University of São Carlos (UFSCar), São Carlos, São Paulo, Brazil

Installation

The UFSCarISD package contains a tutorial and some data objects. You can install the development version of UFSCarISD from GitHub with:

install.packages("remotes")    # If you do not already have the "remotes" package
remotes::install_github("Jpomz/UFSCarISD")

In addition, you must install the sizeSpectra package by using:

remotes::install_github("andrew-edwards/sizeSpectra")

NOTE that this tutorial was built using sizeSpectra 1.1.0 and the last commit was on June 12, 2023 and has commit tag commit 517c18d. If you are trying to follow along on the website what happens on your machine may be slightly different depending on when/how the sizeSpectra package is updated in the future.

Finally, you will also need the suite of packages in the tidyverse. The tidyverse is hosted on CRAN so you can install it and load it with the following two lines of code.

# install.packages("tidyverse") # if you need to install
library(tidyverse)

Example

This is a basic example which shows you what data objects exist:

library(UFSCarISD)
data(package = "UFSCarISD")

There are four data sets included which represent some of the most common body size data formats.

  1. ohc is a vector of individual body sizes. All individuals were measured and this represents a continuous measurement.

  2. WLOU is a dataframe of body sizes from one of the aquatic sites of the National Ecological Observatory Netwrok (NEON). This data has the estimated count per m2 of individuals for a given body size.

  3. fish_binned is a simulated data set where individual fish were grouped into arbitrary “bins” of body size during the data collection process. In this example, the bins are 0.25 g wide, i.e., that was the accuracy of the scale used.

  4. isd_gradient is a simulated dataset with body size observations from three “sites”, each of which has a different individual size distribution relationship. This is used as an example for how to work with data from multiple sites at one time.

You can load the data objects by running data(data_name). For example:

data(WLOU)

You can learn more about each individual data set by running ?data_name. For example:

?WLOU