Learn R Programming

ctrdata (version 1.6.0)

dbFindFields: Find names of fields in the database collection

Description

Given part of the name of a field of interest to the user, this function returns the full field names as found in the database.

Usage

dbFindFields(namepart = "", con, verbose = FALSE)

Arguments

namepart

A plain string (can include a regular expression, including Perl-style) to be searched for among all field names (keys) in the database.

con

A src connection object, as obtained with nodbi::src_mongo() or nodbi::src_sqlite()

verbose

If TRUE, prints additional information (default FALSE).

Value

Vector of names of found field(s) in alphabetical order (that is, not by register or field frequency)

Details

For fields in EUCTR (protocol- and results-related information), see also the register's documentation at https://eudract.ema.europa.eu/.

For fields in CTGOV (protocol-related information), see also the register's definitions at https://prsinfo.clinicaltrials.gov/definitions.html.

Note: Generating a list of fields with this function may take some time, and may involve running a mapreduce function if using a MongoDB server. If the user is not not authorized to run such a function, random documents are sampled to generate a list of fields.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
db <- nodbi::src_sqlite(
  collection = "my_collection"
)
dbFindFields(
  nampepart = "date",
  con = db
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab