f.isUniqueTrial: Calculate if record is unique for a study

View source: R/f_isUniqueTrial.R

f.isUniqueTrialR Documentation

Calculate if record is unique for a study

Description

Trial concept calculated: Applies function dbFindIdsUniqueTrials() with its defaults.

Usage

f.isUniqueTrial(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 '.isUniqueTrial', a logical.

Examples

# fields needed
f.isUniqueTrial()

## Not run: 

# 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.isUniqueTrial",
  con = dbc)

## End(Not run)


ctrdata documentation built on April 3, 2025, 8:12 p.m.