README.md

SPDT

A package to support SPDT data analyses. Source code at: https://github.com/PAskey/SPDT

Installation

Install with devtools package from PAskey github account

#First install the devtools package from CRAN with:
install.packages("devtools")

#Next install the SPDT package from PAskey Github repo as:
devtools::install_github("PAskey/SPDT").

Usage

You must first ensure your VPN is connected and running. If vpn is running, then SPDT functions will connect to the SLD and bring data into your RStudio environment. The primary function is SPDTdata(), which will bring up all SPDT type data (clipped fish), in standardized and cleaned format.

library(SPDT)
SPDTdata()

Main functions and uses

library(SPDT)

# Create a vector of fish lengths from 50 to 650mm
Fish_lengths = c(50:650)

# Estimate the relative probability of capture for each of the fish lengths
pvals = RICselect(Fish_lengths)

#Plot the selectivity function
plot(pvals~Fish_lengths)

#However, you can access this selectivity function directly by simply typing
select_lookup

Lookup data sets within SPDT

There are a few lookup tables that are used for SPDT calculations and you can access as needed:

library(SPDT)#Ignore this line if package already loaded

#To view the data frame in your console simple type the dataframe name as below.
#To load into your enviroment simply assign it a name e.g. Ages <- Ages

#Converting non-standard age notation to ages
Ages

#Converting "stock_strain_loc_name" in PARIS releases to "Strain"" in Biological table of SLD.
Strain_code_LU

#Lookup relative vulnerbaility to RIC gillnet associated with a given fish length
select_lookup


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