makeDATRAS: makeDATRAS

View source: R/makeDATRAS.R

makeDATRASR Documentation

makeDATRAS

Description

This function generates ICES DATRAS-compatible HH for a particular DFO region.

Usage

makeDATRAS(
  region = NULL,
  yr = NULL,
  survey = NULL,
  csv = T,
  fn.oracle.username = "_none_",
  fn.oracle.password = "_none_",
  fn.oracle.dsn = "_none_",
  usepkg = "rodbc",
  data.dir = NULL,
  debug = F
)

Arguments

region

default is NULL. This is the Canadian DFO region for which you want to make the DATRAS files. Valid regions are listed below, but initially, only "Mar" works (Jan, 2020)

  • Mar

  • NFLD

  • Gulf

  • Que

  • Cen

  • Pac

yr

default is NULL. This specifies the year(s) for which you'd like to generate HH files. Single years are fine, as are vectors (e.g. c(2011,1015), 2015:2019)

survey

default is NULL. This specifies the survey for which you'd like to generate HH files. This will be specific to the different regions. Valid values for Maritimes are

  • 4X - Type 1; Spring (i.e. months 1:4); 2008+; not strata 5Z*

  • GEORGES - Type 1; Spring (i.e. months 1:4); 2008+; strata 5Z*

  • SPRING - Type 1; Spring (i.e. months 1:4); pre-2008; specific strata

  • 4VSW - Type 1; Spring (i.e. months 1:4); 4VSW strata;

  • SUMMER - Type 1; Summer (i.e. months 5:8); specific strata

  • FALL - Type 1; Fall (i.e. months 9:12)

csv

default is TRUE. If TRUE, csv files are generated for each HH code. If FALSE, the output exists only in the resultant list.

fn.oracle.username

default is '_none_' Required for Maritimes HH files. This is your username for accessing oracle objects. If you have a value for oracle.username stored in your environment (e.g. from an rprofile file), this can be left out and that value will be used. If a value for this is provided, it will take priority over your existing value.

fn.oracle.password

default is '_none_' Required for Maritimes HH files. This is your password for accessing oracle objects. If you have a value for oracle.password stored in your environment (e.g. from an rprofile file), this can be left out and that value will be used. If a value for this is provided, it will take priority over your existing value.

fn.oracle.dsn

default is '_none_' Required for Maritimes HH files. This is your dsn/ODBC identifier for accessing oracle objects. If you have a value for oracle.dsn stored in your environment (e.g. from an rprofile file), this can be left and that value will be used. If a value for this is provided, it will take priority over your existing value.

usepkg

default is 'rodbc'. Required for Maritimes HH files. This indicates whether the connection to Oracle should use 'rodbc' or 'roracle' to connect. rodbc is slightly easier to setup, but roracle will extract data ~ 5x faster.

data.dir

The default is NULL. Required for Maritimes HH files. This is the path to your Mar.datawrangling rdata files

debug

The default is F. Setting this to TRUE will limit the results to a single set for a single species.

Value

a list containing (named) objects - 1 for each generated HH file

Author(s)

Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca

See Also

Other DATRAS: Cen_DATRAS(), Gulf_DATRAS(), Mar_CA(), Mar_DATRAS(), Mar_HH(), Mar_HL(), NFLD_DATRAS(), Pac_DATRAS(), Que_DATRAS()


Maritimes/CanaDatras documentation built on April 5, 2025, 5:58 p.m.