set_defaults: set_defaults

View source: R/set_defaults.R

set_defaultsR Documentation

set_defaults

Description

This function provides all of the possible parameters understood by this package. Some can be overwritten by fleet_* wrappers.

Usage

set_defaults(
  lics = "all",
  gearSpecs = "all",
  area = "all",
  marfGear = "all",
  marfSpp = "all",
  isdbSpp = "all",
  tripcd_id = NULL,
  returnMARFIS = T,
  returnISDB = T,
  areaFile = "NAFOSubunits_sf",
  areaFileField = "NAFO_1",
  nafoDet = 2,
  dateStart = NULL,
  dateEnd = NULL,
  year = NULL,
  keepSurveyTrips = TRUE,
  keepMissingGear = TRUE,
  maxTripDiff_Hr = 48,
  maxSetDiff_Hr = 48,
  maxSetDiff_Km = 100,
  dropUnmatchedISDB = TRUE,
  manualMatch = FALSE,
  socks = FALSE,
  data.dir = file.path(getwd(), "data"),
  oracle.username = "_none_",
  oracle.password = "_none_",
  oracle.dsn = "PTRAN",
  usepkg = "roracle",
  useLocal = FALSE,
  debugLics = NULL,
  debugVRs = NULL,
  debugMARFTripIDs = NULL,
  debugISDBTripIDs = NULL,
  debugISDBTripNames = NULL,
  debug = FALSE,
  ...
)

Arguments

lics

default is 'all'. Fleet wrappers will populate this with a dataframe specifying the licence types, subtypes, gear and licence species valid for a particular fleet. This information comes from Mar.fleets::LIC_CORE.

gearSpecs

default is 'all'. Fleet wrappers may populate it with a dataframe specifying the particular specifications for a fleets' gear. For example, certain fleets must use particular mesh sizes or shapes. This information comes from Mar.fleets::LIC_GEAR_SPECS.

area

default is 'all'. Certain fleets are only licenced to fish in certain areas. This information comes from Mar.fleets::licAreas.

marfGear

default is 'all', but all wrappers have (overwritable) fleet-specific values. This is a vector of MARFIS gear codes known to have caught this species.

marfSpp

default is 'all'. The marfis species code, usually sent by the fleet wrapper.

isdbSpp

default is 'all'. The ISDB species code, usually sent by the fleet wrapper

tripcd_id

default is NULL. If a tripcd_id from ISDB is provided, all matting records will be examined for matches

returnMARFIS

default is TRUE. Do you want a list object containing marfis trip and set information as part of your results?

returnISDB

default is TRUE. Do you want a list object containing isdb trip and set information as part of your results? (requires returnMARFIS = T)

areaFile

default is 'NAFOSubunits_sf'. This is used to identify which areas to check the trips and sets against. By default, Mar.data::NAFOSubunits_sf is ued, but any objects in Mar.data could be used.

areaFileField

default is 'NAFO_1'. This is a field within the areas object which specifies exactly which field of the areas object data should be compared against.

nafoDet

default is 2, but values between 1 and 4 are acceptable. This specifies the level of detail that will be used in the summarized locations table. Using the default value of 2, trips and sets will be summarized by areas such as "4X", "4V" and "5Z" (i.e 2 characters). If set to "1", areas would be more general (e.g. "3", "4", "5"; i.e. 1 character), while a value like 4 would summarize the trips and sets into very specific NAFO subunits (e.g. "3PSA","4VSB" and "5ZEM")

dateStart

default is NULL. This identifies the start date of the search window, in the format YYYY-MM-DD (e.g. dateStart = "2019-02-19"). If no dateEnd is provided, the window will be for 1 year (i.e, 365 days). ,

dateEnd

default is NULL format is YYYY-MM-DD, e.g. dateEnd = "2019-02-19". dateEnd must be associated with a valid entry of dateStart to identify a block of time for a data extraction (e.g. Jun18, 2018 –> August 27, 2019).

year

default is NULL. year can be used if data should be extracted for an entire calendar year (i.e. Jan 1 –> Dec 31). The format is YYYY, e.g. year = 2018. dateStart takes priority over year if both are provided.

keepSurveyTrips

default is TRUE. Within the ISDB database are non-commercial, survey trips. Setting this to FALSE ensures these trips are dropped.

keepMissingGear

default is TRUE. Some fleets have particular allowable gear sizes and types (see gearSpecs). Many cases exist where all of the gear details are not filled it. When this parameter is set to TRUE, these 'unknown' types and sizes are retained, and the values are set to -999. If it is set to FALSE, any gears with missing values are dropped - and they are not included in the results.

maxTripDiff_Hr

default is 48. Any MARFIS and ISDB trips that vary by more than the # of days specified here will NOT be considered matches (on the basis of common Vessel, licence and date). They may still match on confirmation codes and/or trip names.

maxSetDiff_Hr

default is 48. Any MARFIS and ISDB sets that vary by more than the # of hours specified here will NOT be considered matches.

maxSetDiff_Km

default is 100. Any MARFIS and ISDB sets with positions more than the # of kilometers specified here will NOT be considered matches.

dropUnmatchedISDB

default is TRUE.

manualMatch

default is FALSE. This parameter is only used when calling functions from manual_matcher(). It ensures that the functions work properly with its reduced input format.

socks

default is FALSE. Normally, un-QC'd wrappers generate a prompt forcing the user to acknowledge that they are aware that the script needs further testing. Setting this to TRUE will prevent the prompt from showing up. Why 'socks'? You had to be there.

data.dir

default is 'file.path(getwd(), "data")'. Necessary for useLocal == T. This is the path to a folder where your *.rdata files are stored.

oracle.username

default is '_none_'. This is your username for accessing oracle objects.

oracle.password

default is '_none_'. This is your password for accessing oracle objects.

oracle.dsn

default is '_none_'. This is your dsn/ODBC identifier for accessing oracle objects. Normally, the value should be "PTRAN"

usepkg

default is 'roracle'. This indicates whether the connection to Oracle should use 'rodbc' or 'roracle' to connect. rodbc can be slightly easier to setup, but roracle will extract data faster.

useLocal

default is FALSE. This specifies whether to run the script against local data or against Oracle (requires network or VPN). Depending on your value for useLocal, different values become necessary.

  • useLocal=TRUE This implies that you have local data you want to use.

    • param data.dir required. This is the path to your local data

  • useLocal=FALSE This implies that you have will query Oracle for the necessary data. Include all of the following:

    • param oracle.username required

    • param oracle.password required

    • param oracle.dsn required

    • param usepkg required

debugLics

default is NULL. If a vector of LICENCE_IDs is provided, the script will provide information about when the script drops them from consideration.

debugVRs

default is NULL. If a vector of VR numbers is provided, the script will provide information about when the script drops them from consideration.

debugMARFTripIDs

default is NULL. If a vector of MARFIS trip IDs is provided, the script will provide information about when the script drops them from consideration.

debugISDBTripIDs

default is NULL. If a vector of ISDB trip IDs is provided, the script will provide information about when the script drops them from consideration.

debugISDBTripNames

default is NULL. If a vector of ISDB trip names is provided, the script will provide information about when the script drops them from consideration. Trip "names" are typically in a format like "J18-1234" or "A18-1234A".

debug

default is FALSE. If TRUE, this parameter causes the package to run in debug mode, providing much extraneous information.

...

other arguments passed to methods

Details

The desired date range can be specified multiple ways - either using year (alone), dateStart (alone) or dateStart with dateEnd (explained below).

Author(s)

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

See Also

Other coreFuncs: fleet_(), getED(), getHIC(), getHOC(), getPS(), get_fleet(), get_isdb_sets(), get_isdb_trips(), get_isdb(), get_marfis_sets(), get_marfis(), summarize_locations()


Maritimes/Mar.bycatch documentation built on Aug. 18, 2024, 8:43 a.m.