Learn R Programming

MLZ (version 0.1.1)

bin_length: Bin length data

Description

A tool to bin raw length observations into a length frequency matrix.

Usage

bin_length(df, breaks = NULL)

Arguments

df

A data frame or matrix of length observations. The first column should be named 'Year' and the second column should be named 'Length'.

breaks

An optional vector for breaks for hist.

Value

A list with length bins, years, and frequency matrix.

Details

Length frequencies from Len_df are created by using hist function.

Examples

Run this code
# NOT RUN {
data(SilkSnapper)
Silk.matrix <- bin_length(SilkSnapper, breaks = seq(80, 830, 10))
Silk.matrix <- bin_length(SilkSnapper)
new.dataset <- new("MLZ_data", Year = Silk.matrix$Year, Len_bins = Silk.matrix$Len_bins,
Len_matrix = Silk.matrix$Len_matrix)
# }

Run the code above in your browser using DataLab