Catch (table) by fleet, gear type, sector

table_total_catch(
  dat,
  unit_label = "mt",
  era = NULL,
  interactive = TRUE,
  module = NULL,
  scale_amount = 1,
  digits = 2,
  make_rda = FALSE,
  tables_dir = getwd()
)

Arguments

dat

Data frame or list. A tibble or named list of tibbles (input as `list()`) returned from convert_output.

If inputting a list of tibbles, the first tibble's reference point defined in `ref_line` is used to plot a reference line or calculate relative spawning biomass.

unit_label

String. Abbreviated catch units

Default: "mt"

era

String. Era of data.

Default: "time"

Options: "early", "time", "fore" (forecast), or NULL (all data)

interactive

Logical. TRUE/FALSE; indicate whether the environment is interactive.

Default: `FALSE`

module

Character vector. (Optional) Module name found in `dat$module_name`. If selecting >1 module, place them in a vector like c("module1", "module2").

Default: NULL

If the interactive and >1 module_name is found, user will select the module_name in the console. @seealso [filter_data()]

scale_amount

Number. A number to scale the y-axis values.

Default: 1

digits

Number. Numeric value indicating the number of digits catch values in the table will be rounded to.

Default: 2

make_rda

Logical. TRUE/FALSE; indicate whether to save the object and make an automated caption and alternative text in the form of an `rda` object. If TRUE, the rda will be exported to the folder indicated in the argument "figures_dir".

Default: `FALSE`.

tables_dir

Path. The location of the folder containing the generated table rda files ("tables") that will be created if the argument `make_rda` = TRUE.

Default: the working directory (`getwd()`)

Value

A table ready of landed catch by fleet and year.

Details

The input is from an assessment model output file translated to a standardized output (convert_output). There are options to return a [gt::gt()] object or export an rda object containing a gt-based table, caption, and LaTeX-based table.

See also

[convert_output()], [filter_data()], [process_table()], [export_kqs()], [insert_kqs()], [create_rda()]

Examples

table_total_catch(stockplotr::example_data,
  module = "TIME_SERIES"
)
Year Fleet 1 (mt) Fleet 2 (mt)
1874 0 0
1875 0 0
1876 0 3.02
1877 0 3.02
1878 0 3.02
1879 0 3.02
1880 0 34.89
1881 0 66.76
1882 0 98.63
1883 0 130.5
1884 0 162.37
1885 0 194.24
1886 0 226.11
1887 0 257.99
1888 0 289.86
1889 0 321.73
1890 0 353.61
1891 0 385.48
1892 0 417.36
1893 0 449.27
1894 0 481.15
1895 0 513.03
1896 0.73 544.91
1897 0.59 576.79
1898 0.46 608.67
1899 0.45 640.55
1900 0.44 672.44
1901 0.43 704.32
1902 0.41 736.21
1903 0.4 768.1
1904 0.39 799.99
1905 0.38 831.88
1906 0.36 863.77
1907 0.35 895.66
1908 0.34 927.55
1909 0.33 959.45
1910 0.31 991.34
1911 0.3 1,023.24
1912 0.29 1,055.14
1913 0.28 1,087.04
1914 0.26 1,118.94
1915 0.25 1,150.84
1916 0.24 1,167.81
1917 0.23 1,590.92
1918 0.21 1,281
1919 0.2 1,007.77
1920 0.19 696.62
1921 0.18 887.83
1922 0.16 1,283.82
1923 0.15 1,291.63
1924 0.14 1,610.52
1925 0.13 1,597.3
1926 0.11 1,576.8
1927 0.11 1,910.46
1928 0 1,874.42
1929 4.63 2,134.32
1930 3.68 1,991.7
1931 51.56 1,886.27
1932 125.28 1,682.95
1933 163.37 1,282.87
1934 207.07 3,359.06
1935 260.58 2,707.65
1936 346.24 1,545.22
1937 594.62 2,472.88
1938 404.2 2,991.5
1939 1,123.62 3,510.33
1940 1,808.06 2,161.89
1941 2,316.25 1,226.01
1942 5,790.37 839.28
1943 5,881.66 1,261.26
1944 3,338.32 1,541.38
1945 2,923.69 1,616.5
1946 4,792.04 3,657.75
1947 2,659.33 4,043.94
1948 5,920.19 6,988.12
1949 2,470.95 6,805.64
1950 4,446.51 6,005.6
1951 3,258.15 3,758.37
1952 2,595.41 3,984.55
1953 1,243.64 4,597.78
1954 1,904.23 5,747.53
1955 1,960.15 4,989.68
1956 1,716.21 3,884.65
1957 3,159.25 4,828.19
1958 2,676.14 4,342.2
1959 2,063.52 3,631.08
1960 3,107.7 3,415
1961 3,035.39 4,682.49
1962 3,940.13 4,212.59
1963 3,623.23 4,613.81
1964 2,786.84 3,753.34
1965 2,710.72 3,694.54
1966 2,891.12 4,054.51
1967 2,782.17 3,839.03
1968 2,457.01 4,011.85
1969 2,852.8 4,007.38
1970 3,502.32 4,743.78
1971 3,950.76 4,786.46
1972 4,001.51 4,916.56
1973 4,947.9 4,004.12
1974 6,219.16 4,788.35
1975 6,033.15 4,581.86
1976 4,250.73 4,187.19
1977 3,819.6 3,111.8
1978 5,611.27 3,765.94
1979 5,022.28 4,444.33
1980 4,231.46 3,423.52
1981 3,732.91 2,565.05
1982 5,552.57 2,524.33
1983 4,948.58 1,816.7
1984 3,492.21 1,846.72
1985 2,991.51 2,682.44
1986 3,122.84 2,290.55
1987 4,230.02 2,627.01
1988 4,156.33 2,533.69
1989 4,013.42 2,644.47
1990 3,309.96 2,119.1
1991 3,635.06 2,309.92
1992 3,124.88 1,691.44
1993 3,243.69 1,434.11
1994 2,565.51 1,695.85
1995 3,292.61 1,820.02
1996 3,113.79 2,507.16
1997 3,441.85 2,561.94
1998 3,057.61 1,452.59
1999 2,866.29 1,733.6
2000 3,847.55 1,956.53
2001 3,908.12 1,759.97
2002 4,215.76 1,473.56
2003 5,154.13 1,246.13
2004 4,540.65 1,499.31
2005 6,055.27 2,318.56
2006 5,703.25 2,281.3
2007 4,096.1 2,791.55
2008 3,991.77 2,814.12
2009 4,042.26 1,622.37
2010 1,956.03 701.58
2011 2,300.68 536.2
2012 2,716.08 667.91
2013 5,367.06 1,436.83
2014 5,378.33 1,881.17
2015 6,284.08 1,742.76
2016 6,789.69 1,423.51
2017 6,968.11 1,854.2
2018 6,873.82 1,831.8
2019 6,257.37 1,613.41
2020 4,658.66 1,632.67
2021 6,325.23 2,331.53
2022 6,296.82 2,903.22
2023 3,182.84 6,389.7
2024 2,793.22 5,668.27
2025 2,347.85 4,852.75
2026 2,209.93 4,659.44
2027 2,146.54 4,604.49
2028 2,146.27 4,652.26
2029 2,176.16 4,734.24
2030 2,212.46 4,809.2
2031 2,242.44 4,860.7
2032 2,260.69 4,884.99
2033 2,272.78 4,898.19
2034 2,278.06 4,900.48
table_total_catch( stockplotr::example_data, unit_label = "lbs", module = "TIME_SERIES", digits = 4, scale_amount = 100 )
Year Fleet 1 (hundreds of lbs) Fleet 2 (hundreds of lbs)
1874 0 0
1875 0 0
1876 0 0.0302
1877 0 0.0302
1878 0 0.0302
1879 0 0.0302
1880 0 0.3489
1881 0 0.6676
1882 0 0.9863
1883 0 1.305
1884 0 1.6237
1885 0 1.9424
1886 0 2.2611
1887 0 2.5799
1888 0 2.8986
1889 0 3.2173
1890 0 3.5361
1891 0 3.8548
1892 0 4.1736
1893 0 4.4927
1894 0 4.8115
1895 0 5.1303
1896 0.0073 5.4491
1897 0.0059 5.7679
1898 0.0046 6.0867
1899 0.0045 6.4055
1900 0.0044 6.7244
1901 0.0043 7.0432
1902 0.0041 7.3621
1903 0.004 7.681
1904 0.0039 7.9999
1905 0.0038 8.3188
1906 0.0036 8.6377
1907 0.0035 8.9566
1908 0.0034 9.2755
1909 0.0033 9.5945
1910 0.0031 9.9134
1911 0.003 10.2324
1912 0.0029 10.5514
1913 0.0028 10.8704
1914 0.0026 11.1894
1915 0.0025 11.5084
1916 0.0024 11.6781
1917 0.0023 15.9092
1918 0.0021 12.81
1919 0.002 10.0777
1920 0.0019 6.9662
1921 0.0018 8.8783
1922 0.0016 12.8382
1923 0.0015 12.9163
1924 0.0014 16.1052
1925 0.0013 15.973
1926 0.0011 15.768
1927 0.0011 19.1046
1928 0 18.7442
1929 0.0463 21.3432
1930 0.0368 19.917
1931 0.5156 18.8627
1932 1.2528 16.8295
1933 1.6337 12.8287
1934 2.0707 33.5906
1935 2.6058 27.0765
1936 3.4623 15.4522
1937 5.9462 24.7288
1938 4.042 29.915
1939 11.2362 35.1033
1940 18.0806 21.6189
1941 23.1625 12.2601
1942 57.9037 8.3928
1943 58.8166 12.6126
1944 33.3832 15.4138
1945 29.2369 16.165
1946 47.9204 36.5775
1947 26.5933 40.4394
1948 59.2019 69.8812
1949 24.7095 68.0564
1950 44.4651 60.056
1951 32.5815 37.5837
1952 25.9541 39.8455
1953 12.4364 45.9778
1954 19.0423 57.4753
1955 19.6015 49.8968
1956 17.1621 38.8465
1957 31.5925 48.2819
1958 26.7614 43.422
1959 20.6352 36.3108
1960 31.077 34.15
1961 30.3539 46.8249
1962 39.4013 42.1259
1963 36.2323 46.1381
1964 27.8684 37.5334
1965 27.1072 36.9454
1966 28.9112 40.5451
1967 27.8217 38.3903
1968 24.5701 40.1185
1969 28.528 40.0738
1970 35.0232 47.4378
1971 39.5076 47.8646
1972 40.0151 49.1656
1973 49.479 40.0412
1974 62.1916 47.8835
1975 60.3315 45.8186
1976 42.5073 41.8719
1977 38.196 31.118
1978 56.1127 37.6594
1979 50.2228 44.4433
1980 42.3146 34.2352
1981 37.3291 25.6505
1982 55.5257 25.2433
1983 49.4858 18.167
1984 34.9221 18.4672
1985 29.9151 26.8244
1986 31.2284 22.9055
1987 42.3002 26.2701
1988 41.5633 25.3369
1989 40.1342 26.4447
1990 33.0996 21.191
1991 36.3506 23.0991
1992 31.2488 16.9144
1993 32.4369 14.3411
1994 25.6551 16.9585
1995 32.9261 18.2002
1996 31.1379 25.0716
1997 34.4185 25.6194
1998 30.5761 14.5259
1999 28.6629 17.336
2000 38.4755 19.5653
2001 39.0812 17.5997
2002 42.1576 14.7356
2003 51.5413 12.4613
2004 45.4065 14.9931
2005 60.5527 23.1856
2006 57.0325 22.813
2007 40.961 27.9155
2008 39.9177 28.1412
2009 40.4226 16.2237
2010 19.5603 7.0158
2011 23.0068 5.362
2012 27.1608 6.6791
2013 53.6706 14.3683
2014 53.7833 18.8117
2015 62.8408 17.4276
2016 67.8969 14.2351
2017 69.6811 18.542
2018 68.7382 18.318
2019 62.5737 16.1341
2020 46.5866 16.3267
2021 63.2523 23.3153
2022 62.9682 29.0322
2023 31.8284 63.897
2024 27.9322 56.6827
2025 23.4785 48.5275
2026 22.0993 46.5944
2027 21.4654 46.0449
2028 21.4627 46.5226
2029 21.7616 47.3424
2030 22.1246 48.092
2031 22.4244 48.607
2032 22.607 48.8499
2033 22.7278 48.9819
2034 22.7807 49.0048