A class for modelling a fish stock.
FLStock(object, ...) # S4 method for FLQuant FLStock(object, plusgroup = dims(object)$max, ...) # S4 method for missing FLStock(object, ...) # S4 method for FLQuants FLStock(object, ...)
The FLStock
object contains a representation of a fish stock as
constructed for the purposes of scientific analysis and advice. This includes
information on removals (i.e. catches, landings and discards), maturity,
natural mortality and the results of an analytical assessment (i.e. estimates
of abundance and removal rates) .
FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).FLQuant
).character
).character
).numeric
).All slots in the class have accessor and replacement methods defined that allow retrieving and substituting individual slots.
The values passed for replacement need to be of the class of that slot. A numeric vector can also be used when replacing FLQuant slots, and the vector will be used to substitute the values in the slot, but not its other attributes.
A construction method exists for this class that can take named arguments for
any of its slots. All slots are then created to match the requirements of the
class validity. If an unnamed FLQuant
object is provided, this is used
for sizing but not stored in any slot.
[, [<-, as.FLBiol, as.FLSR, catch, catch<-, catch.n, catch.n<-, catch.wt, catch.wt<-, coerce, computeCatch, computeDiscards, computeLandings, discards, discards<-, discards.n, discards.n<-, discards.wt, discards.wt<-, harvest, harvest<-, harvest.spwn, landings, landings<-, landings.n, landings.n<-, landings.wt, landings.wt<-, m, m<-, mat, m.spwn, plot, ssb, ssbpurec, stock, stock.n, stock.wt, trim, FLComp
data(ple4) summary(ple4)#> An object of class "FLStock" #> #> Name: Plaice in IV #> Description: Imported from a VPA file. ( N:\Projecten\ICES WG\Demersale werkgroep WGNSS [...] #> Quant: age #> Dims: age year unit season area iter #> 10 52 1 1 1 1 #> #> Range: min max pgroup minyear maxyear minfbar maxfbar #> 1 10 10 1957 2008 2 6 #> #> catch : [ 1 52 1 1 1 1 ], units = t #> catch.n : [ 10 52 1 1 1 1 ], units = 10^3 #> catch.wt : [ 10 52 1 1 1 1 ], units = kg #> discards : [ 1 52 1 1 1 1 ], units = t #> discards.n : [ 10 52 1 1 1 1 ], units = 10^3 #> discards.wt : [ 10 52 1 1 1 1 ], units = kg #> landings : [ 1 52 1 1 1 1 ], units = t #> landings.n : [ 10 52 1 1 1 1 ], units = 10^3 #> landings.wt : [ 10 52 1 1 1 1 ], units = kg #> stock : [ 1 52 1 1 1 1 ], units = t #> stock.n : [ 10 52 1 1 1 1 ], units = 10^3 #> stock.wt : [ 10 52 1 1 1 1 ], units = kg #> m : [ 10 52 1 1 1 1 ], units = m #> mat : [ 10 52 1 1 1 1 ], units = #> harvest : [ 10 52 1 1 1 1 ], units = f #> harvest.spwn : [ 10 52 1 1 1 1 ], units = #> m.spwn : [ 10 52 1 1 1 1 ], units =#> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 #> all 70563 73354 79300 87541 85984 87472 107118 110540 97143 101834 #> year #> age 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 #> all 108819 111534 121651 130342 113944 122843 130429 112540 108536 113670 #> year #> age 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 #> all 119188 113984 145347 139951 139747 154547 144038 156147 159838 165347 #> year #> age 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 #> all 153670 154475 169818 156240 148004 125190 117113 110392 98356 81673 #> year #> age 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 #> all 83048 71534 80662 81148 81963 70217 66502 61436 55700 57943 #> year #> age 2007 2008 #> all 49744 48874 #> #> units: tlandings(ple4) <- apply(landings.n(ple4)*landings.wt(ple4),2,sum) # perform similar calculation as the preceding apply function discards(ple4) <- computeDiscards(ple4) catch(ple4) <- computeCatch(ple4) catch(ple4) <- computeCatch(ple4, slot="all") # set the units of the harvest slot of an FLStock object harvest(ple4) <- 'f' # subset and trim the FLStock ple4[,1]#> An object of class "FLStock" #> Slot "catch": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> all 78423 #> #> units: t #> #> Slot "catch.n": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 32356 #> 2 49911 #> 3 69038 #> 4 45627 #> 5 32732 #> 6 8910 #> 7 11029 #> 8 9028 #> 9 4973 #> 10 10859 #> #> units: 1000 #> #> Slot "catch.wt": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0.04600 #> 2 0.10902 #> 3 0.21303 #> 4 0.28438 #> 5 0.38648 #> 6 0.50561 #> 7 0.59189 #> 8 0.65408 #> 9 0.43975 #> 10 1.10829 #> #> units: kg #> #> Slot "discards": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> all 7859.9 #> #> units: t #> #> Slot "discards.n": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 32356 #> 2 45596 #> 3 9220 #> 4 909 #> 5 961 #> 6 25 #> 7 0 #> 8 0 #> 9 0 #> 10 0 #> #> units: 10^3 #> #> Slot "discards.wt": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0.046 #> 2 0.102 #> 3 0.147 #> 4 0.180 #> 5 0.204 #> 6 0.231 #> 7 0.244 #> 8 0.231 #> 9 0.000 #> 10 0.000 #> #> units: kg #> #> Slot "landings": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> all 70563 #> #> units: t #> #> Slot "landings.n": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0 #> 2 4315 #> 3 59818 #> 4 44718 #> 5 31771 #> 6 8885 #> 7 11029 #> 8 9028 #> 9 4973 #> 10 10859 #> #> units: 10^3 #> #> Slot "landings.wt": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0.00000 #> 2 0.18323 #> 3 0.22321 #> 4 0.28651 #> 5 0.39200 #> 6 0.50638 #> 7 0.59189 #> 8 0.65408 #> 9 0.43975 #> 10 1.10829 #> #> units: kg #> #> Slot "stock": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> all 330542 #> #> units: t #> #> Slot "stock.n": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 457973 #> 2 256778 #> 3 322069 #> 4 182986 #> 5 117504 #> 6 49780 #> 7 48438 #> 8 35192 #> 9 20763 #> 10 45210 #> #> units: 10^3 #> #> Slot "stock.wt": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0.0390 #> 2 0.0990 #> 3 0.1600 #> 4 0.2480 #> 5 0.3250 #> 6 0.4850 #> 7 0.7190 #> 8 0.6820 #> 9 0.8440 #> 10 1.1428 #> #> units: kg #> #> Slot "m": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0.1 #> 2 0.1 #> 3 0.1 #> 4 0.1 #> 5 0.1 #> 6 0.1 #> 7 0.1 #> 8 0.1 #> 9 0.1 #> 10 0.1 #> #> units: m #> #> Slot "mat": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0.0 #> 2 0.5 #> 3 0.5 #> 4 1.0 #> 5 1.0 #> 6 1.0 #> 7 1.0 #> 8 1.0 #> 9 1.0 #> 10 1.0 #> #> units: #> #> Slot "harvest": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0.077176 #> 2 0.228583 #> 3 0.255342 #> 4 0.303990 #> 5 0.346502 #> 6 0.208456 #> 7 0.273603 #> 8 0.314286 #> 9 0.290078 #> 10 0.290078 #> #> units: f #> #> Slot "harvest.spwn": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0 #> 2 0 #> 3 0 #> 4 0 #> 5 0 #> 6 0 #> 7 0 #> 8 0 #> 9 0 #> 10 0 #> #> units: #> #> Slot "m.spwn": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> 1 0 #> 2 0 #> 3 0 #> 4 0 #> 5 0 #> 6 0 #> 7 0 #> 8 0 #> 9 0 #> 10 0 #> #> units: #> #> Slot "name": #> [1] "Plaice in IV" #> #> Slot "desc": #> [1] "Imported from a VPA file. ( N:\\Projecten\\ICES WG\\Demersale werkgroep WGNSSK\\2009\\stock\\ple-nsea\\final runs\\index.txt ). Tue Jun 16 06:32:20 2009 + FLAssess: " #> #> Slot "range": #> min max plusgroup minyear maxyear minfbar maxfbar #> 1 10 10 1957 1957 2 6 #>#> An object of class "FLStock" #> Slot "catch": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 #> all 171235 172671 204286 218424 226930 220928 296876 342985 311635 277738 #> year #> age 1990 #> all 228734 #> #> units: t #> #> Slot "catch.n": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 #> 2 187465 294168 252348 556026 376742 302760 558090 1459325 623255 #> 3 134673 124146 213631 145750 326860 179882 212227 296920 710060 #> 4 78210 57977 70653 101311 78078 187424 120271 112666 135502 #> 5 25167 36176 28871 30163 38960 32720 85930 66106 48262 #> 6 18068 12469 16824 12978 13730 15622 24195 34976 25268 #> year #> age 1989 1990 #> 2 532602 311831 #> 3 299105 266440 #> 4 317172 139099 #> 5 60133 164825 #> 6 19362 26934 #> #> units: 1000 #> #> Slot "catch.wt": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 #> 2 0.19647 0.18302 0.15125 0.15079 0.14748 0.16732 0.14016 0.11228 0.10170 #> 3 0.34757 0.33243 0.31011 0.27324 0.26141 0.26278 0.27277 0.21626 0.19628 #> 4 0.40472 0.42191 0.42308 0.37669 0.31915 0.32863 0.30956 0.34481 0.27322 #> 5 0.47743 0.51033 0.51507 0.50361 0.47260 0.45136 0.41625 0.39320 0.44180 #> 6 0.54976 0.56634 0.60958 0.59826 0.60039 0.56380 0.48056 0.49583 0.50229 #> year #> age 1989 1990 #> 2 0.11727 0.13049 #> 3 0.21311 0.20832 #> 4 0.28737 0.28644 #> 5 0.36295 0.35564 #> 6 0.52357 0.43874 #> #> units: kg #> #> Slot "discards": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 #> all 31284 32924 49739 74386 70783 61090 131529 189315 157160 107920 #> year #> age 1990 #> all 72494 #> #> units: t #> #> Slot "discards.n": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 #> 2 122561 193241 204572 436331 313490 229208 490965 1374202 608109 #> 3 932 1850 4624 30716 52651 35566 48510 180969 459385 #> 4 687 373 1109 2235 24529 2221 26470 1427 61167 #> 5 193 431 216 804 1492 200 1451 1348 882 #> 6 86 55 98 72 69 78 146 248 177 #> year #> age 1989 1990 #> 2 485845 279298 #> 3 193176 168674 #> 4 85758 28102 #> 5 7224 5011 #> 6 115 177 #> #> units: 10^3 #> #> Slot "discards.wt": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 #> 2 0.147 0.133 0.125 0.124 0.125 0.138 0.123 0.104 0.098 0.102 0.113 #> 3 0.190 0.178 0.182 0.180 0.172 0.176 0.180 0.165 0.154 0.163 0.159 #> 4 0.211 0.210 0.199 0.203 0.210 0.195 0.192 0.203 0.184 0.180 0.185 #> 5 0.220 0.219 0.231 0.205 0.203 0.231 0.211 0.211 0.211 0.192 0.205 #> 6 0.000 0.244 0.231 0.244 0.000 0.244 0.244 0.231 0.231 0.244 0.231 #> #> units: kg #> #> Slot "landings": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 #> all 139951 139747 154547 144038 156147 159838 165347 153670 154475 169818 #> year #> age 1990 #> all 156240 #> #> units: t #> #> Slot "landings.n": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 #> 2 64904 100927 47776 119695 63252 73552 67125 85123 15146 46757 #> 3 133741 122296 209007 115034 274209 144316 163717 115951 250675 105929 #> 4 77523 57604 69544 99076 53549 185203 93801 111239 74335 231414 #> 5 24974 35745 28655 29359 37468 32520 84479 64758 47380 52909 #> 6 17982 12414 16726 12906 13661 15544 24049 34728 25091 19247 #> year #> age 1990 #> 2 32533 #> 3 97766 #> 4 110997 #> 5 159814 #> 6 26757 #> #> units: 10^3 #> #> Slot "landings.wt": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 #> 2 0.28988 0.27880 0.26364 0.24844 0.25889 0.25869 0.26569 0.24590 0.25013 #> 3 0.34867 0.33476 0.31294 0.29813 0.27858 0.28417 0.30026 0.29626 0.27377 #> 4 0.40644 0.42329 0.42665 0.38061 0.36914 0.33023 0.34273 0.34663 0.34664 #> 5 0.47941 0.51384 0.51721 0.51179 0.48333 0.45272 0.41977 0.39699 0.44610 #> 6 0.55239 0.56777 0.61180 0.60024 0.60343 0.56540 0.48200 0.49772 0.50420 #> year #> age 1989 1990 #> 2 0.27592 0.28061 #> 3 0.30450 0.29341 #> 4 0.32717 0.31212 #> 5 0.38629 0.36036 #> 6 0.52524 0.44011 #> #> units: kg #> #> Slot "stock": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 #> all 414322 389969 462516 508060 533381 559762 723533 747205 657608 583061 #> year #> age 1990 #> all 521888 #> #> units: t #> #> Slot "stock.n": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 #> 2 526233 805139 659043 1441943 932456 845435 1287477 3217441 1391822 #> 3 291840 297833 448698 356286 775815 485353 476987 634086 1523108 #> 4 177595 135962 151399 202787 183739 391068 268056 229719 291306 #> 5 66561 86299 67874 69784 87119 91984 175570 128142 100687 #> 6 47093 36287 43675 33952 34452 41769 52106 77123 53066 #> year #> age 1989 1990 #> 2 1270543 867289 #> 3 666514 643008 #> 4 702735 318570 #> 5 134691 334158 #> 6 45197 64673 #> #> units: 10^3 #> #> Slot "stock.wt": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 #> 2 0.159 0.136 0.125 0.124 0.126 0.144 0.124 0.103 0.096 0.099 0.109 #> 3 0.299 0.246 0.258 0.250 0.223 0.238 0.252 0.204 0.176 0.193 0.184 #> 4 0.440 0.433 0.361 0.392 0.425 0.326 0.317 0.383 0.269 0.245 0.270 #> 5 0.444 0.473 0.490 0.494 0.464 0.452 0.440 0.401 0.426 0.362 0.343 #> 6 0.524 0.536 0.589 0.559 0.571 0.536 0.533 0.503 0.467 0.484 0.422 #> #> units: kg #> #> Slot "m": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 #> 2 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 #> 3 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 #> 4 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 #> 5 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 #> 6 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 #> #> units: m #> #> Slot "mat": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 #> 2 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 #> 3 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 #> 4 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 #> 5 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 #> 6 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 #> #> units: #> #> Slot "harvest": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 #> 2 0.46921 0.48466 0.51506 0.51983 0.55295 0.47236 0.60826 0.64783 0.63631 #> 3 0.66383 0.57661 0.69420 0.56222 0.58503 0.49368 0.63063 0.67781 0.67353 #> 4 0.62169 0.59472 0.67451 0.74488 0.59190 0.70085 0.63806 0.72484 0.67139 #> 5 0.50665 0.58104 0.59270 0.60586 0.63513 0.46833 0.72264 0.78161 0.70098 #> 6 0.51640 0.44822 0.51912 0.51389 0.54294 0.49954 0.66972 0.64772 0.69431 #> year #> age 1989 1990 #> 2 0.58104 0.47478 #> 3 0.63822 0.57201 #> 4 0.64337 0.61438 #> 5 0.63364 0.73094 #> 6 0.59848 0.57593 #> #> units: f #> #> Slot "harvest.spwn": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 #> 2 0 0 0 0 0 0 0 0 0 0 0 #> 3 0 0 0 0 0 0 0 0 0 0 0 #> 4 0 0 0 0 0 0 0 0 0 0 0 #> 5 0 0 0 0 0 0 0 0 0 0 0 #> 6 0 0 0 0 0 0 0 0 0 0 0 #> #> units: #> #> Slot "m.spwn": #> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 #> 2 0 0 0 0 0 0 0 0 0 0 0 #> 3 0 0 0 0 0 0 0 0 0 0 0 #> 4 0 0 0 0 0 0 0 0 0 0 0 #> 5 0 0 0 0 0 0 0 0 0 0 0 #> 6 0 0 0 0 0 0 0 0 0 0 0 #> #> units: #> #> Slot "name": #> [1] "Plaice in IV" #> #> Slot "desc": #> [1] "Imported from a VPA file. ( N:\\Projecten\\ICES WG\\Demersale werkgroep WGNSSK\\2009\\stock\\ple-nsea\\final runs\\index.txt ). Tue Jun 16 06:32:20 2009 + FLAssess: " #> #> Slot "range": #> min max plusgroup minyear maxyear minfbar maxfbar #> 2 6 NA 1980 1990 2 6 #>#> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 #> all 274205 288540 296825 308164 321354 372863 370373 363077 344013 361549 #> year #> age 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 #> all 416563 402521 377432 333933 316343 319062 268714 278648 293136 310954 #> year #> age 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 #> all 316929 303433 297122 272416 262061 263998 314021 326341 348675 375392 #> year #> age 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 #> all 445855 391254 408489 368969 335747 269528 228668 193093 174408 173903 #> year #> age 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 #> all 185308 211327 184733 208393 234078 162725 179158 151508 167531 173783 #> year #> age 2007 2008 #> all 166061 206480 #> #> units: tssbpurec(ple4)#> An object of class "FLQuant" #> , , unit = unique, season = all, area = unique #> #> year #> age 1957 #> all 6.801 #> #> units: NA# Coerce an FLStock to an FLBiol biol <- as(ple4, "FLBiol") # Initialise an FLSR object from an FLStock flsr <- as.FLSR(ple4)