f.sponsorType: Calculate type of sponsor of a study

View source: R/f_sponsorType.R

f.sponsorTypeR Documentation

Calculate type of sponsor of a study

Description

Trial concept calculated: type or class of the sponsor(s) of the study. No specific field is available in ISRCTN; thus, sponsor type is set to 'other'. Note: If several sponsors, sponsor type is deemed 'for profit' if any sponsor is commercial.

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()

# 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)
trialsDf


rfhb/ctrdata documentation built on July 5, 2025, 6:40 a.m.