Mar_DATRAS: Mar_DATRAS

View source: R/Mar_DATRAS.R

Mar_DATRASR Documentation

Mar_DATRAS

Description

This function generates ICES DATRAS-compatible files directly from the Maritimes groundfish database.

Usage

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

Arguments

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(s) for which you'd like to generate HH files. Valid values 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_' 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_' 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_' 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'. 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. 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_HH(), Mar_HL(), NFLD_DATRAS(), Pac_DATRAS(), Que_DATRAS(), makeDATRAS()


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