Skip to contents

Trial concept calculated: type or class of the lead or main sponsor of the trial. Some information is not yet mapped (e.g., "NETWORK" in CTGOV2). No specific field is available in ISRCTN.

Usage

f.sponsorType(df = NULL)

Arguments

df

data frame such as from dbGetFieldsIntoDf. If `NULL`, prints fields needed in `df` for calculating this trial concept, which can be used with dbGetFieldsIntoDf.

Value

data frame with columns `_id` and `.sponsorType`, which is a factor with levels `For profit`, `Not for profit` or `Other`.

Examples

# fields needed
f.sponsorType()
#> $euctr
#> [1] "b1_sponsor.b31_and_b32_status_of_the_sponsor"
#> 
#> $ctgov
#> [1] "sponsors.lead_sponsor.agency_class"
#> 
#> $ctgov2
#> [1] "protocolSection.sponsorCollaboratorsModule.leadSponsor.class"
#> 
#> $isrctn
#> [1] "ctrname"
#> 
#> $ctis
#> [1] "sponsorType"                                                
#> [2] "primarySponsor.commercial"                                  
#> [3] "authorizedApplication.authorizedPartI.sponsors.isCommercial"
#> 

if (FALSE) { # \dontrun{

# apply trial concept when creating data frame
dbc <- nodbi::src_sqlite(
  dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
  collection = "my_trials", flags = RSQLite::SQLITE_RO)
trialsDf <- dbGetFieldsIntoDf(
  calculate = "f.sponsorType",
  con = dbc)
} # }