Skip to contents

Find a keyword in all names and labels of a list of datasets.

Usage

find_keyword(keyword, data = get_lookup(), ignore_case = TRUE)

Arguments

keyword

the keyword to search for. Can handle regular expressions (see examples).

data

the lookup dataframe where to search the keyword. Can be set using edc_options(edc_lookup=my_data), which is done automatically when calling read_trialmaster().

ignore_case

should case differences be ignored in the match? Default to TRUE.

Value

a tibble

Examples

if (FALSE) { # \dontrun{
path = system.file("extdata/Example_Export_SAS_XPORT_2022_08_25_15_16.zip", 
                   package="EDCimport", mustWork=TRUE)
w = read_trialmaster(path, verbose=FALSE)

find_keyword("patient")

#with regex
find_keyword("patient$")
find_keyword("\\d")
find_keyword("(Trial|Form) Name")
find_keyword("\\(") #you need to escape special characters
} # }