I am running into this error
Error: Cannot open file for writing:
- '~Desktop\PhenotypeLibraryDiagnosticsOutput\diagnosticsExport\concept_set.csv
This error happens when I run runCohortDiagnostics and using incremental = TRUE
I think this argument will help the library to create inclusion stats which what I need.
I believe that this error happens because the file is trying to append but not sure why it is happening in my code or if someone else experienced this error.
@gowtham : Any idea why I am getting this error?
I included below the function that I run:
CohortDiagnostics::runCohortDiagnostics(
packageName = “PhenotypeLibraryDiagnostics”,
cohortToCreateFile = “settings/cohortDescription.csv”,
connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
oracleTempSchema = oracleTempSchema,
cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable,
inclusionStatisticsFolder = outputFolder,
exportFolder = file.path(outputFolder, “diagnosticsExport”),
databaseId = databaseId,
databaseName = databaseName,
databaseDescription = databaseDescription,
runInclusionStatistics = TRUE,
runIncludedSourceConcepts = FALSE,
runOrphanConcepts = FALSE,
runTimeDistributions = TRUE,
runBreakdownIndexEvents = TRUE,
runIncidenceRate = TRUE,
runCohortOverlap = TRUE,
runCohortCharacterization = TRUE,
runTemporalCohortCharacterization = TRUE,
runVisitContext = TRUE,
minCellCount = 2,
incremental = TRUE,
incrementalFolder = incrementalFolder,
cohortIds=dx_cohortsid)