lfqResample {fishboot} | R Documentation |
Resampling of length-frequency data
Description
This function resamples the lfq
data by sampling dates.
Sampling is done in a non-parametric way following the relative frequencies
of the original data, allowing for individual counts to be selected more than
once (i.e. replace = TRUE
in sample), and resulting in
total counts (by sample) equal to the original data.
Usage
lfqResample(lfq)
Arguments
lfq |
A length frequency object of the class |
Value
A resampled version of the lfq
class dataset.
Examples
# Load data
data("alba", package = "TropFishR")
# Resample lfq data
alba_p <- lfqResample(lfq = alba)
# Side-by-side plot
op <- par(no.readonly = TRUE)
par(mfcol = c(2, 1), mar = c(4, 4, 2, 1))
# Original
plot(x = TropFishR::lfqRestructure(alba), Fname = "rcounts")
mtext("original", side=3, line=0.25)
# Resampled
plot(TropFishR::lfqRestructure(alba_p), Fname = "rcounts")
mtext("resampled", side=3, line=0.25)
par(op)
[Package fishboot version 1.0.2 Index]