Learn R Programming

rfishbase (version 0.2-2)

getSize: Returns available size data of specified type (length, weight, or age)

Description

Returns available size data of specified type (length, weight, or age)

Usage

getSize(fish.data = NULL, value = c("length", "weight", "age"),
  path = NULL)

Arguments

fish.data
the fishbase database or a subset
value
the measure to return: maximum recorded length (cm), maximum weight (g), or maximum age (years). Defaults to length; many entries lack weight and age.
path
to updated copy of the cache; optional.

Value

  • a numeric vector of length(fish.data) with the values requested

Examples

Run this code
data(fishbase)
yr <- getSize(fish.data, "age")
hist(yr, breaks=40, main="Age Distribution", xlab="age (years)");
nfish <- length(fish.data)

Run the code above in your browser using DataLab