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. If several sponsors, sponsor type is deemed `for profit` if any sponsor is commercial.
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"
#>
# 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)
#> Querying database (7 fields)...
trialsDf
#> _id .sponsorType
#> 1 12949496 other
#> 2 13281214 other
#> 3 17473621 other
#> 4 2012-003632-23-CZ for profit
#> 5 2012-003632-23-SE for profit
#> 6 2014-002606-20-PT for profit
#> 7 2014-003556-31-GB for profit
#> 8 2014-003556-31-SE for profit
#> 9 2022-500244-37-00 not for profit
#> 10 2022-501142-30-00 not for profit
#> 11 2023-505613-24-00 for profit
#> 12 2023-508143-51-01 not for profit
#> 13 2024-510663-34-00 for profit
#> 14 20343063 other
#> 15 61070850 other
#> 16 76463425 other
#> 17 80181452 other
#> 18 88261002 other
#> 19 NCT00617929 other
#> 20 NCT01125800 for profit
#> 21 NCT01483820 other
#> 22 NCT01505608 other
#> 23 NCT01592045 for profit
#> 24 NCT02620761 other
#> 25 NCT03280147 other
#> 26 NCT03325439 for profit
#> 27 NCT03431558 other
#> 28 NCT03876704 other
#> 29 NCT04001712 other
#> 30 NCT04041765 other
#> 31 NCT05969327 other