removeBrokenSpeciesListLinks: Remove rows which are not pointing to a valid...

View source: R/removeBrokenSpeciesListLinks.R

removeBrokenSpeciesListLinksR Documentation

Description

Remove rows which are not pointing to a valid SpecliestListDetails (SL) records i.e.those rows which have a value of SpeciesListName that does not exist in the SL table.

Usage

removeBrokenSpeciesListLinks(objectToCheck, verbose = FALSE, strict = TRUE)

Arguments

objectToCheck

an RDBESDataObject.

verbose

(Optional) If set to TRUE more detailed text will be printed out by the function. Default is TRUE.

strict

(Optional) This function validates its input data - should the validation be strict? The default is TRUE.

Value

an RDBESDataObject with any records with an invalid SpeciesListName rows removed

Examples

## Not run: 

myH1RawObject <-
  importRDBESDataCSV(rdbesExtractPath = "tests\\testthat\\h1_v_1_19")
myFields <- c("SLspeclistName")
myValues <- c("WGRDBES-EST TEST 5 - sprat data")
myFilteredObject <- filterRDBESDataObject(myH1RawObject,
  fieldsToFilter = myFields,
  valuesToFilter = myValues
)
myObjectValidSpeciesListLinks <- removeBrokenSpeciesListLinks(
  objectToCheck = myFilteredObject,
  verbose = FALSE
)

## End(Not run)

ices-tools-dev/icesRDBES documentation built on April 17, 2025, 1:58 p.m.