match_manual: match_manual

View source: R/match_manual.R

match_manualR Documentation

match_manual

Description

This function was created to circumvent the "fleet" aspect of the wrappers, and match marfis data with ISDB data.

Usage

match_manual(TRIP_ID_MARF = NULL, TRIP_ID_ISDB = NULL, manualMatch = T, ...)

Arguments

TRIP_ID_MARF

The default is NULL. This can be "ALL", or a vector of 1 or more MARFIS TRIP_ID values you wish to attempt to find matches for in the ISDB schema. Discrete values (i.e. not "ALL") can ONLY be provided to one of TRIP_ID_MARF OR TRIP_ID_ISDB - not both.

TRIP_ID_ISDB

The default is NULL. This can be "ALL", or a vector of 1 or more ISDB TRIP_ID values you wish to attempt to find matches for in the MARFISSCI schema. Discrete values (i.e. not "ALL") can ONLY be provided to one of TRIP_ID_MARF OR TRIP_ID_ISDB - not both.

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.

...

Arguments passed on to set_defaults

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.

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).

marfSpp

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

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.

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")

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.

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.

debug

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

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".

Author(s)

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


Maritimes/Mar.bycatch documentation built on Feb. 6, 2024, 3:27 p.m.