filter-rows
Finds rows in a datatable that match a search string or regular expression
Arguments
Inputs:
data
: The datatable to be searched and filtered.
column
: The name of the column to be searched and used as a basis for filtering.
pattern
: A string or a regular expression to be searched for within the list. Regular expressions must be wrapped with / character (e.g. /.*/).
Output:
data
: A datatable containing the rows where the selected column matches the testing pattern. This will be empty if there are no matches.
complementary
: A datatable containing the rows where the selected column does not match the testing pattern. This will be empty if all rows match the testing pattern.
Possible use cases
Select data from one country in a datatable containing data from multiple countries.
Select all samples that have a particular sequencing run name.
Select all samples with a flagged value in a certain column.
Last updated