SPDTplot: SPDTplot

View source: R/SPDTplot.R

SPDTplotR Documentation

SPDTplot

Description

A plot function for SPDT data when a contrast has been specified. Function only usable by FFSBC staff who have a direct or vpn connection to SLD.

Usage

SPDTplot(
  Metric = NULL,
  Method = "GN",
  Ages = c(0:100),
  min_N = 0,
  min_groups = 1,
  filters = NULL,
  save_pdf = FALSE
)

Arguments

Metric

a character string that describes the performance metric (dependent variable) to be plotted.This must be entered for function to work. The specific options that can be stated are: "survival" (standardized relative catch rate of one contrast group to another), A series of plots that summarize all age classes captured in a given sampling event. The plots show changes in size, numbers or maturation over time if multiple age classes were captured.

"survival' (relative survival of each group, value of 1 equivalent, estimated relative survival shown by dotted line)

"catch" (catch rates of each group - catch curve type data),

"age_freq" (same data as above, but columns instead of points),

"mu_growth_FL" (average length per age),

"mu_growth_wt" (average weight per age),

"growth_FL" (individual lengths per age),

"growth_wt" (raw weights by age),

"maturation" (the proportion mature per age),

"maturation_by_sex" (partitions data used in plot above by sex)

A series of plots looking at the overall size distribution of the entire population in a lake (all age classes)

"FL_freq" (fork-length frequencies per lake-sample session as lines),

"FL_density"(fork-length frequencies per lake-sample session as smoothed densities),

"FL_hist"(fork-length frequencies per lake-sample session as histograms),

In all cases the data will be grouped by the "Contrast" stated during the SPDT data call.

Method

a character string describing the capture method. Defaults to "GN" (gillnet), but any other capture method code fo rmthe database is acceptable.

Ages

a numeric vector or value of the ages to include in plotting

min_N

an integer to set a minimum sample size to include in plots. This sample size applies to each contrast group. In other words, even if one group meets the minimum sample size, if the gourp it is being contrasted against does not, then that contrast (Lk_yr_age) will be removed.

min_groups

an integer to set a minimum number of contrast groups meeting the minimum sample size(min_N) within the grouping levels of the gdf data frame (lake, year, age) to include in plots.

filters

a vector of lake-years returned from the SPDTfilter() function. SPDTfilter() allows for filtering to various non-biological aspects to the data, lakes, years, regions, et.c See?SPDTfilter()

save_pdf

a logical TRUE/FALSE indicating whether a copy of the plot should be saved with the filename Metric.pdf

Examples

#Must be connected to VPN if working remotely

#Download all data from lake years that had a genotype comparison for KO
SPDTdata(Spp = "KO", Contrast = "Genotype")

Plot the relative survival of the contrast groups
SPDTplot(Metric = "survival")



PAskey/SPDT documentation built on May 31, 2024, 12:21 a.m.