Function to plot sex ratio by strata
plot_sex_ratio_strata.RdFunction to plot sex ratio by strata
Arguments
- data
Data object with biological data from
pull_bio()with a column namedSexorsexis present.- strata_df
Strata dataframe created by
create_strata()- dir
Directory where output will be saved. The directory where the file should be saved. If dir = NULL no output will be saved.
- comp_column_name
The name of the column to create composition data for that must be a string. This column can be is used to determine whether to format the composition data for length or age compositions by looking for either age (e.g.,
age_years,Age,age,best_age) or length (e.g.,length,length_cm,Length,Length_cm) in the comp_column_name. The comp_column_name is not case sensitive.The default islength_cm.- strata_vars
Column names in
datato define the stratas by. The default columns areDepth_mordepth_mandLatitude_ddorlatitude_dd.- bin_width
Width to bin the data by. The default is 2 cm for lengths and 1 for ages.
- main
Unique string that will be added to the saved png name. This can be useful when plotting data for various data sets separately.
- width, height
Numeric values for the figure width and height in inches. The defaults are 7 by 7 inches.