# \donttest{
eunomiaConnectionDetails <- Eunomia::getEunomiaConnectionDetails()
covSettings <- createDefaultCovariateSettings()
Eunomia::createCohorts(
connectionDetails = eunomiaConnectionDetails,
cdmDatabaseSchema = "main",
cohortDatabaseSchema = "main",
cohortTable = "cohort"
)
covData1 <- getDbCovariateData(
connectionDetails = eunomiaConnectionDetails,
tempEmulationSchema = NULL,
cdmDatabaseSchema = "main",
cdmVersion = "5",
cohortTable = "cohort",
cohortDatabaseSchema = "main",
cohortTableIsTemp = FALSE,
cohortId = 1,
rowIdField = "subject_id",
covariateSettings = covSettings,
aggregated = TRUE
)
covData2 <- getDbCovariateData(
connectionDetails = eunomiaConnectionDetails,
tempEmulationSchema = NULL,
cdmDatabaseSchema = "main",
cdmVersion = "5",
cohortTable = "cohort",
cohortDatabaseSchema = "main",
cohortTableIsTemp = FALSE,
cohortId = 2,
rowIdField = "subject_id",
covariateSettings = covSettings,
aggregated = TRUE
)
table1 <- createTable1(
covariateData1 = covData1,
covariateData2 = covData2,
cohortId1 = 1,
cohortId2 = 2,
specifications = getDefaultTable1Specifications(),
output = "one column",
showCounts = FALSE,
showPercent = TRUE,
percentDigits = 1,
valueDigits = 1,
stdDiffDigits = 2
)
# }
Run the code above in your browser using DataLab