check_registry: Check whether registry associated with TRN is correct

View source: R/check_registry.R

check_registryR Documentation

Check whether registry associated with TRN is correct

Description

For example, "NCT00312962" should be associated with "clinicaltrials.gov". PubMed secondary identifies associate TRNs with registries but occassionally misclassify the registry. For example, https://pubmed.ncbi.nlm.nih.gov/25884819/ misclassifies "NTR1912" with JPRN instead of NTR.

Usage

check_registry(new, old)

Arguments

new

Vector of new (aka correct) registries

old

Vector of old (e.g., associated by PubMed) registries

Details

Designed to be used following mutate_trn_registry.

Value

A vector of TRUE and FALSE. NAs treated as character, such that if both new and old are NA, returns TRUE.

Examples

df <- mutate_trn_registry(sample_trn_df, text)

# Use with a vector
check_registry(df$registry, df$registry_guess)

# Use with a dataframe
dplyr::mutate(df, registry_correct = check_registry(registry, registry_guess))

maia-sh/ctregistries documentation built on July 20, 2024, 8:08 p.m.