| compare,FLStock,fwdControl-method {FLasher} | R Documentation |
fwd() run with the defined targets.A comparison between the objects or objects returned by fwd() and the
targets and limits set in the fwdControl object used to run, is returned
by this method.
## S4 method for signature 'FLStock,fwdControl' compare(result, target, simplify = FALSE) ## S4 method for signature 'fwdControl,FLStock' compare(result, target) ## S4 method for signature 'FLBiol,fwdControl' compare(result, target, fishery, simplify = FALSE)
result |
Object returned by the call to fwd() |
target |
fwdControl object with required targets |
simplify |
Return whole table or logical vector only, logical |
fishery |
FLFishery oir FKFisheries object |
A comparison is carried out for each row in a fwdControl object,
that is, for every target or limit.
A data.frame is returned with columns 'year', 'quant', 'season' and
'unit' if relevant, and 'achieved'. The last is of class logical and will
have value TRUE if the target or limits have been achieved for every
iteration, and FALSE otherwise.
Values are compared using all.equal.
A table of comparisons, one for each target, of class data.frame.
Iago Mosqueira (WMR)
data(ple4) control <- fwdControl( list(quant="fbar", value=0.5, year=1990), list(quant="catch", value=1, year=1991, relYear=1990), list(quant="catch", min=10000, year=1993, max=100000)) run <- fwd(ple4, sr=predictModel(model=rec~a*ssb*exp(-b*ssb), params=FLPar(a=9.16, b=3.55e-6)), control=control) # Returns the full comparison table compare(run, control) # Returns a logical vector compare(run, control, simplify=TRUE)