Trial concept calculated: sample size of the trial, preferring results-related over protocol-related information.
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.
Examples
# fields needed
f.sampleSize()
#> $euctr
#> [1] "trialInformation.countrySubjectCounts.countrySubjectCount.subjects"
#> [2] "f11_number_of_subjects_for_this_age_range"
#> [3] "f1111_number_of_subjects_for_this_age_range"
#> [4] "f1121_number_of_subjects_for_this_age_range"
#> [5] "f1131_number_of_subjects_for_this_age_range"
#> [6] "f1141_number_of_subjects_for_this_age_range"
#> [7] "f1151_number_of_subjects_for_this_age_range"
#> [8] "f1161_number_of_subjects_for_this_age_range"
#> [9] "f121_number_of_subjects_for_this_age_range"
#> [10] "f131_number_of_subjects_for_this_age_range"
#>
#> $ctgov
#> [1] "enrollment"
#>
#> $ctgov2
#> [1] "protocolSection.designModule.enrollmentInfo.count"
#>
#> $isrctn
#> [1] "participants.targetEnrolment" "participants.totalFinalEnrolment"
#>
#> $ctis
#> [1] "authorizedPartsII.recruitmentSubjectCount"
#> [2] "authorizedPartI.rowSubjectCount"
#> [3] "authorizedApplication.authorizedPartsII.recruitmentSubjectCount"
#> [4] "authorizedApplication.authorizedPartI.rowSubjectCount"
#>
# 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.sampleSize",
con = dbc)
#> Querying database (18 fields)...
trialsDf
#> _id .sampleSize
#> 1 12949496 9
#> 2 13281214 60
#> 3 17473621 100
#> 4 2012-003632-23-CZ 45
#> 5 2012-003632-23-SE 45
#> 6 2014-002606-20-PT 300
#> 7 2014-003556-31-GB 76
#> 8 2014-003556-31-SE 76
#> 9 2022-500244-37-00 440
#> 10 2022-501142-30-00 520
#> 11 2023-505613-24-00 32
#> 12 2023-508143-51-01 11
#> 13 2024-510663-34-00 12
#> 14 20343063 238
#> 15 61070850 63
#> 16 76463425 2804
#> 17 80181452 850
#> 18 88261002 2200
#> 19 NCT00617929 12
#> 20 NCT01125800 76
#> 21 NCT01483820 8
#> 22 NCT01505608 14
#> 23 NCT01592045 28
#> 24 NCT02620761 1
#> 25 NCT03280147 261
#> 26 NCT03325439 9
#> 27 NCT03431558 300
#> 28 NCT03876704 120
#> 29 NCT04001712 54
#> 30 NCT04041765 70
#> 31 NCT05969327 66