filterNested: Keep rows that match a nested condition

filterNestedR Documentation

Keep rows that match a nested condition

Description

Keep rows that match a nested condition

Usage

filterNested(object, pattern, ...)

## S4 method for signature 'DFrame,character'
filterNested(object, pattern, ignoreCase = FALSE)

Arguments

object

Object.

pattern

character(1). Pattern to use for matching.

ignoreCase

logical(1). Perform case insensitive pattern matching.

...

Additional arguments.

Details

Intended for partial matching with regular expressions. For exact matches, refer to matchNested function.

Value

Modified object, containing only matching rows.

Note

Updated 2023-12-12.

Examples

## DFrame ====
pattern <- "^[A-Z]+$"
object <- S4Vectors::DataFrame(
    "V1" = c("a", "b", "c"),
    "V2" = I(list(
        c("aa", "bb", "CC"),
        c("dd", "ee", "ff"),
        c("gg", "hh", "ii")
    ))
)
object <- filterNested(object = object, pattern = pattern)
print(object)

acidgenomics/r-acidplyr documentation built on July 4, 2025, 5:55 a.m.