age_representativeness_plot.Rd
Compare length histogram of aged samples to all lengthed samples
The dataframe containing the lengths and ages. Currently the function works with data from the West Coast Groundfish Bottom Trawl Survey extracted by the nwfscSurvey package as well as PacFIN data. Must include either the columns Year, Length_cm, and Age, or, for PacFIN data, SAMPLE_YEAR, FISH_LENGTH, and FISH_AGE_YEARS_FINAL. Additional columns can be present.
The x limits for the histogram
The y limits for the histogram
The maximum length in cm (If PacFIN data is provided, FISH_LENGTH is automatically converted from mm to cm).
The relative or absolute path and name of the file to write to, as a .png file.
A vector of two integers that determine the matrix
dimensions of the plots panels (row x columns), i.e., used in par()
if !is.null(file)
.
A logical specifying if you want R to ask you to confirm
page changes between plots. The default is FALSE
and it will also
be FALSE
if plots are saved to the disk.
Several plots, potentially, are printed to the screen or saved to the disk
Output on figures include K-S p-value, which is the p-value output from
ks.test
and is colored red if <.05 and green if >=.05, and
expression(hat(b))
, which is the bhattacharyya coefficient calculated
as sum(sqrt(pi1*pi2))
where pi1 and pi2 are the proportion of data in
bin i for each of the two distributions.