heatmap_extract_sample_size: Extract the sample size data frame, or a data frame of...

View source: R/utils-heatmap-extract-sample-size.R

heatmap_extract_sample_sizeR Documentation

Extract the sample size data frame, or a data frame of logical values for presence/absence of sample sizes if ret_mask is TRUE

Description

Extract the sample size data frame, or a data frame of logical values for presence/absence of sample sizes if ret_mask is TRUE

Usage

heatmap_extract_sample_size(
  sample_size_df = NULL,
  wa = NULL,
  ret_mask = FALSE,
  ...
)

Arguments

sample_size_df

A data frame where ages are columns (and start with the letter 'a'). If the values are zero, the weight-at-age was extrapolated/interpolated. If there is a value, the weight-at-age is data

wa

A weight-at-age data frame as created by heatmap_extract_wa()

ret_mask

Logical. If TRUE, return a data frame the same dimensions as wa which contains only the yr column and TRUE/FALSE values in the table cells

...

Absorb arguments meant for other functions

Value

A data frame containing years (yr) column and columns for age, represented as numbers (no text appended to them). If ret_mask is TRUE then each cell is either TRUEor FALSE representing presence or absence of samples for that year/age combination.The dimensions of the returned data frame will be identical to the dimensions of wa. If ret_mask is FALSE, the data frame returned will be the same dimensions as wa plus two more rows and one more column. The two rows are one row containing the year and all NAs (a blank row for the table) and a row of the column totals, The extra column contains the row sums Set the first and second elements to NA so that nothing appears in row sums column for the first two cells


pacific-hake/hake-assessment documentation built on Jan. 14, 2025, 9:12 p.m.