dbFindFields: Find names of fields in the database collection

Description Usage Arguments Details Value Examples

View source: R/utils.R

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

1
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).

Details

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

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.

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
db <- nodbi::src_sqlite(
  collection = "my_collection"
)
dbFindFields(
  nampepart = "date",
  con = db
)

## End(Not run)

ctrdata documentation built on Nov. 22, 2021, 1:06 a.m.