In export.R script under the study package for population estimation:
reference <- readRDS(file.path(outputFolder, "cmOutput", "outcomeModelReference.rds"))
getCovariateAnalyses <- function(cmAnalysis) {
cmDataFolder <- reference$cohortMethodDataFolder[reference$analysisId == cmAnalysis$analysisId][1]
cmData <- CohortMethod::loadCohortMethodData(file.path(outputFolder, "cmOutput", cmDataFolder), readOnly = TRUE)
-
The reference table does not have ‘cohortMethodDataFolder’ column.
names(reference)
[1] “analysisId” “targetId” “comparatorId” “outcomeId”
[5] “includedCovariateConceptIds” “excludedCovariateConceptIds” “outcomeOfInterest” “cohortMethodDataFile”
[9] “studyPopFile” “sharedPsFile” “psFile” “strataFile”
[13] “prefilteredCovariatesFile” “outcomeModelFile” -
CohortMethod::loadCohortMethodData does not accept the argument ‘readOnly = TRUE’