Twigs

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Background

Twigs are the smallest above ground woody component of a tree. Twigs are responsible for supporting the delicate tissues needed to grow leaves and protect the buds during the dormant season. Because twig measurements are the basis for the Real Twig method, and publicly available databases of twigs are limited, we present a database of twig measurements for a wide range of tree genera and species.

Installation

You can install the package directly from CRAN:

install.packages("rTwig")

Or the latest development version from GitHub:

devtools::install_github("https://github.com/aidanmorales/rTwig")

Load Packages

The first step is to load the rTwig package.

library(rTwig)

# Useful packages
library(dplyr)
library(ggplot2)

Twig Database

The twig database is built directly into rTwig and can be called as follows:

# If the rTwig library has been loaded
twigs
# If rTwig hasn't been loaded, but just the twigs are needed
rTwig::twigs

The database is broken into 7 different columns. scientific_name is the specific epithet. Genus spp. is the average of all of the species in the genus. radius_mm is the twig radius in millimeters. For each species, n is the number of unique twig samples taken, min is the minimum twig radius, max is the max twig radius, std is the standard deviation, and cv is the coefficient of variation.

Let's see the breakdown of species.

unique(twigs$scientific_name)

Visualization

Let's visualize some of the twig data!

# Lets look at a subset of oak species
twigs %>%
  filter(grepl("Quercus", scientific_name)) %>%
  ggplot(aes(x = scientific_name, y = radius_mm, color = scientific_name)) +
  geom_point(aes(size = n)) +
  geom_errorbar(aes(ymax = max, ymin = min)) +
  coord_flip() +
  labs(
    title = "Quercus Twig Radii",
    x = "",
    y = "Twig Radius (mm)",
    color = "Species",
    size = "Sample Size"
  ) +
  scale_x_discrete(limits = rev) +
  theme_classic()


Try the rTwig package in your browser

Any scripts or data that you put into this service are public.

rTwig documentation built on Sept. 11, 2024, 7:01 p.m.