The returned object will include all rows which either: a) do not included
any of the field names in fieldsToFilter
, or b) do include the field names
and have one of the allowed values in valuesToFilter
.
If you want to filter for a id field like DEid
, FTid
etc, the filtering
works only on the table where the id field is its key. For example, if you
try to filter on FOid
it does not look FOid
in other tables like FT
,
although the field FOid
exists in FT
table.
filterRDBESDataObject(
RDBESDataObjectToFilter,
fieldsToFilter,
valuesToFilter,
killOrphans = FALSE,
verbose = FALSE,
strict = TRUE
)
The RDBESDataObject
to filter
A vector of the field names you wish to check
A vector of the field values you wish to filter for
Controls if orphan rows are removed. Default is FALSE
.
(Optional) Set to TRUE if you want informative text printed out, or FALSE if you don't. The default is FALSE.
(Optional) This function validates its input data - should the validation be strict? The default is TRUE.
the filtered input object of the same class as
RDBESDataObjectToFilter
killOrphans
allows you to remove orphaned rows if set to TRUE
. The
default is FALSE
.
if (FALSE) {
myH1RawObject <-
importRDBESDataCSV(rdbesExtractPath = "tests\\testthat\\h1_v_1_19")
myFields <- c("SDctry", "VDctry", "VDflgCtry", "FTarvLoc")
myValues <- c("ZW", "ZWBZH", "ZWVFA")
myFilteredObject <- filterRDBESDataObject(myH1RawObject,
fieldsToFilter = myFields,
valuesToFilter = myValues
)
}