create_depth_by_year_csv_files: Get depth data by year and calculate boxplot stats on it....

View source: R/utils-create-depth-by-year-csv-files.R

create_depth_by_year_csv_filesR Documentation

Get depth data by year and calculate boxplot stats on it. This writes a CSV file containing the output

Description

Get depth data by year and calculate boxplot stats on it. This writes a CSV file containing the output

Usage

create_depth_by_year_csv_files(
  d = NULL,
  col_name_depth = "best_depth",
  col_name_year = "year",
  country = c("can", "us"),
  fleet = c("ft", "ss", "atsea", "cp", "ms", "sb"),
  type = c("bottom", "gear"),
  output_path = here(data_tables_path),
  probs = probs_forecast,
  yrs = NULL,
  scale = 1.8288,
  min_depth_cutoff = 0,
  digits = 2
)

Arguments

d

Output from load_spatial_catch_data()

col_name_depth

The name of the column in the data frame d that contains the depths

col_name_year

The name of the column which holds the years

country

The country the data is from (used in the output file name only)

fleet

The fleet shorthand for the fleet/sector (used in the output file name only)

type

One of bottom or gear for depth type (used in the output file name only)

output_path

The directory in which to write the output CSV file

probs

A vector of the proabilities to use for the depth stats that will become the box ends and whisker ends of the box plots when they are plotted with plot_depth()

yrs

A vector of years to include. If NULL, all years in the data will be included

scale

A value to multiply the depths by. Default value of 1.8288 converts fathoms to meters. Set to 1 to use values as-is

min_depth_cutoff

The depth for which to remove data. All data shallower than this will be removed. If this is left at the default of zero, all zero depth records will be removed from the data

digits

The number of decimal points to round the depths to

Value

Invisibly - A tibble containing year and depth record stats


pacific-hake/hake-assessment documentation built on Nov. 8, 2024, 1:16 p.m.