self_filter: self_filter

View source: R/self_filter.r

self_filterR Documentation

self_filter

Description

This function draws upon the relationships between the tables reported in load_datasources() so that if one is filtered via the GUI, or via a subset like ISGEARCODES = ISGEARCODES[ISGEARCODES$GEARCD_ID==7,]), all other tables will be filtered until the remaining records all relate to eachother. For example, if the ISVESSELS table was filtered to only contain a single vessel - all other tables would be filtered until all remaing records in all tables relate directly to that vessel.

Usage

self_filter(
  db = NULL,
  looponce = FALSE,
  debug = FALSE,
  env = .GlobalEnv,
  keep_nullsets = TRUE,
  quiet = FALSE
)

Arguments

db

default is NULL. This identifies the dataset you are working with.

looponce

default is NULL. This is only used for QC purposes.

debug

default is FALSE. This is used for debugging, and will cause the filtering commands to be printed out.

env

This the the environment you want this function to work in. The default value is .GlobalEnv.

keep_nullsets

default is TRUE If you're working the data that can be extracted via this package, it can be useful to know where fishing occurred that did not result in catches. Note that for industry fishing (i.e. ISDB, MARFIS, COMLAND**), this will just ensure that all sets matching your criteria are retained. If you have selected data by the "caught species", you will have already exluded the nullsets.

quiet

default is FALSE. If True, the filtering process will not show text describing progress.

Note

This line is here to prevent an error message

Author(s)

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

See Also

Other dfo_extractions: get_data_custom(), get_data(), get_survey(), summarize_catches()


Maritimes/Mar.datawrangling documentation built on Feb. 6, 2024, 3:25 a.m.