Learn R Programming

rfishbase (version 0.2-2)

getQuantTraits: Returns all quantitative trait values found in the morphology data

Description

Returns all quantitative trait values found in the morphology data

Usage

getQuantTraits(fish.data = NULL, path = NULL)

Arguments

fish.data
the fishbase database or a subset
path
to cached copy of fishbase (optional, defaults to copy in package).

Value

  • a matrix of traits by fish. Returns min-max numbers recorded for vertebrae, spines (anal and dorsal), and rays (anal and dorsal).

Examples

Run this code
data(fishbase)
## The distribution of anal ray fins in red-colored fish
redfish  <- which_fish("red ", "diagnostic", fish.data)
traits <- getQuantTraits(fish.data[redfish])
hist(traits[, "min.anal.rays"])

Run the code above in your browser using DataLab