format_IPTDS_NosaDES: Format Natural Origin Spawner Abundance (NOSA) DES tables for...

View source: R/format_IPTDS_NosaDES.R

format_IPTDS_NosaDESR Documentation

Format Natural Origin Spawner Abundance (NOSA) DES tables for IPTDS.

Description

Format NOSA data generated from get_NOSAestimates for the coordinated assessments natural origin spawner abundance DES tables. The function requires an odbc connection from behind the NPT firewall to download CAX metadata tables from the CDMS database. Additionally, if a dataframe is not supplied a connection to https://npt-cdms.nptfisheries.org using cdmsR::cdmsLogin() is also required.

Usage

format_IPTDS_NosaDES(
  df = NULL,
  alpha = c("0.05", "0.10"),
  odbc_connection,
  cdms_url = "https://npt-cdms.nptfisheries.org"
)

Arguments

df

excellent dataframe output from get_NOSAestimates.

alpha

Type I error rate. Default is set at 0.05 to produce 95% confidence intervals.

odbc_connection

an open odbc channel to CDMS database

cdms_host

URL for CDMS website. The default is the Nez Perce Tribe's data repository https://npt-cdms.nptfisheries.org.

Value

coordinated assessments NOSA DES table

Examples

cdmsR::cdmsLogin('your_username', 'your_password')
df <- get_NOSAestimates()
con <- RODBC::odbcConnect(dsn = 'data source', uid = 'your_username', pwd = 'your_password')
format_NOSAdes(df, odbc_connection = con)

ryankinzer/cuyem documentation built on April 20, 2024, 2:10 p.m.