Find list
objects whose names contain any elements of x
. Note
that data.frame
objects are considered list
objects.
Value
returns a named list
of character
vectors containing
the names of list
objects with some names matching to x
or
invisibly returns NULL
where there are no list
objects in
envir
.
Examples
data(mtcars); in_which("cyl")
#> $cyl
#> [1] "mtcars"
#>
# check for common subject identifiers, explicitly defining case
in_which(
c("ID", "SUBJECT", "SUBJID", "USUBJID"),
ignore_case = FALSE
)
#> $ID
#> [1] "dmcognigen_cov"
#>
#> $SUBJECT
#> character(0)
#>
#> $SUBJID
#> [1] "dmcognigen_cov"
#>
#> $USUBJID
#> [1] "dmcognigen_cov"
#>