| coerce {FLCore} | R Documentation |
Coercion methods for various sets of classes are generated using the
coerce function. Users should call the corresponding generated
as() method, with arguments equal to the object to coerce and the name of the
class to convert to.
Coercion combinations work by transferring or transforming relevant slots from the
original object and placing them in a new object of the target class. The descriptions
below document how slots for each pair of classes are transfered or transformed. In all
cases the name and desc slots are simply copied accross.
coerce(from, to, strict)
n to stock.n, wt to stock.wt,
m to m,fec to mat,spwn to m.spwnstock.n to n, stock.wt to wt,
m to m,mat to fec,m.spwn to spwncatch.n to catch.n, catch.wt to
catch.wt, catch to catch, landings.n to landings.n,
landings.wt to landings.wt, landings to landings,
discards.n to discards.n, discards.wt to discards.wt,
discards to discards, name to nameFLMetier object with a
single catch element.FLFleet object with a
single metier and catch.FLCohort-class object is created from the
year-structured data in an FLQuant. See FLCohort for a
description of the exact procedure.FLQuant is returned.list object is created from an
FLlst-class by dropping the extra attributes.The FLR Team
data(ple4) flb <- as(ple4, 'FLBiol')