fwdWindow | R Documentation |
Objects to be projected into the future are extended until an end year, and the values of certain quantities, usually assume constant, are set following different mechanisms.
fwdWindow(x, y, ...)
## S4 method for signature 'FLStock,missing'
fwdWindow(
x,
end = dims(x)$maxyear,
nsq = 3,
fun = c("mean", "geomean", "sample"),
years = list(wt = nsq, mat = nsq, m = nsq, spwn = nsq, discards.ratio = nsq, catch.sel
= nsq)
)
x |
The FLR object to extend. |
y |
A second object from which information is taken. |
For 'FLStock'
An object of the same class as 'x'.
The FLR Team.
window()
data(ple4)
# Use mean of last three years and extend until 2020
fut <- fwdWindow(ple4, end=2020)
# Check values on catch.wt
catch.wt(fut)[, ac(2015:2020)]
# Use mean of the 2010:2015 period
fut <- fwdWindow(ple4, end=2020, years=2010:2015)
# Use last three years mean, but last five for 'wt'
fut <- fwdWindow(ple4, end=2020, nsq=3, years=list(wt=5))
stock.wt(fut)[, ac(2013:2020)]
catch.sel(fut)[, ac(2013:2020)]
# Resample from last years for 'wt'
fut <- fwdWindow(ple4, end=2020, nsq=3, fun=c(wt='sample'))
# Years to resample can be different for 'catch.sel'
fut <- fwdWindow(ple4, end=2020, nsq=3,
fun=c(wt='sample', catch.sel='sample'), years=c(wt=10, catch.sel=5))
# 'wt' slot has been resampled,
stock.wt(fut)[, ac(2015:2020)]
# while others have used a 3 year average
catch.sel(fut)[, ac(2015:2020)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.