Keep rows that match a nested condition
Source:R/AllGenerics.R
, R/filterNested-methods.R
filterNested.Rd
Keep rows that match a nested condition
Usage
filterNested(object, pattern, ...)
# S4 method for 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.
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)
#> DataFrame with 1 row and 2 columns
#> V1 V2
#> <character> <list>
#> 1 a aa,bb,CC