knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

rorqual.morpho

Overview

rorqual.morpho is an implementation of the allometric equations in Kahane-Rapport and Goldbogen (2018), allowing users to predict morphological parameters of rorquals from body length measurements.

Installation

You can install rorqual.morpho from GitHub with:

# install.packages("devtools")
devtools::install_github("FlukeAndFeather/rorqual.morpho")

Note: uncomment and run the first line if you don't have devtools installed.

Usage

You can use the rorq_*() family of functions to predict morphological parameters. Note: rorq_*() functions will return Balaenoptera acutorostrata (species code ba) parameters for B. bonaerensis (species code bb).

library(rorqual.morpho)
# Predict the body mass and engulfment capacities of three blue whales of different sizes.
rorq_mass(c("bw", "bw", "bw"), c(18, 20, 22))
rorq_engulf(c("bw", "bw", "bw"), c(18, 20, 22))

# Use dplyr to predict fluke and flipper lengths for a tibble of humpback and minke whales
library(dplyr)
tribble(
  ~ species, ~ length,
  "mn",      8,
  "mn",      11.5,
  "mn",      15,
  "ba",      4.5,
  "ba",      6.75,
  "bb",      9
) %>% 
  mutate(fluke = rorq_fluke(species, length),
         flipper = rorq_flipper(species, length))


FlukeAndFeather/rorqual.morpho documentation built on Dec. 8, 2020, 5:15 p.m.