flquant2lfq | R Documentation |
Convert FLIBM to lfq object
flquant2lfq(flquant)
flquant |
FLQuant object (e.g. 'obj$stock.l@catch.n') |
lfq class (plot.lfq
) object
stk <- create.FLIBM(
length = 0:85, age = 0:6,
year = ac(2000:2002), unit = "all",
season = ac(1:12), area = "all", iter = "all",
n.units = "1e3", wt.units = "kg"
)
# recruitment changes
stk$rec$params$season_wt[] <- 0
stk$rec$params$season_wt[4] <- 1
stk$rec$params['rmax'] <- 1e4
stk <- spinup.FLIBM(obj = stk, nyearsslope = 5)
stk <- adv.FLIBM(stk, year = ac(2000:2002), monitor = TRUE)
dim(stk$inds)
plot(simplify(stk$stock.a, dims = "season"))
plot(stk$stock.a@stock.n)
lfq <- flquant2lfq(flq = stk$stock.l@catch.n)
pal <- colorRampPalette(c("grey30",5,7,2), bias=2)
with(lfq, image(x=dates, y=midLengths, z=t(catch), col=pal(100)))
# Further plotting functionality with TropFishR
library(TropFishR)
plot(lfq, Fname = "catch", hist.sc = 0.8)
lfq2 <- lfqModify(lfq, bin_size = 2)
plot(lfq2, Fname = "catch", hist.sc = 0.8)
lfq2 <- lfqRestructure(lfq2, MA=5)
plot(lfq2, Fname = "rcounts", hist.sc = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.