This error is caused by the fact that the version of CohortMethod is not compatible with the version of the estimation script. Make sure you install the version defined in the script (see the README file for instructions).
Thank you! I originally installed the versions specified in the README file, but got errors. Can you help? Thanks!
Here is the error message:
Executing SQL took 5.41 secs
Fetching data from server
Registered S3 methods overwritten by 'ffbase':
method from
[.ff ff
[.ffdf ff
[<-.ff ff
[<-.ffdf ff
Fetching data took 8.58 secs
Fetching outcomes from server
Fetching outcomes took 2.43 secs
Error in setwd(dfile) : cannot change working directory
In addition: Warning messages:
1: In dir.create(outputFolder, recursive = TRUE) :
'.\result4' already exists
2: In execute(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema, :
fftempdir './tmp4/' not found. Attempting to create folder
3: In dir.create(getOption("fftempdir"), recursive = TRUE) :
'.\tmp4' already exists
Warning: Error 'cannot open the connection' when writing log to file './result4//log.txt. Removing file appender from logger.
Warning: Could not find logger DEFAULT
In execute(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema, :
fftempdir './tmp4/' not found. Attempting to create folder
I think you’re setting outputfolder or fftempdir as .\result4 and ./tmp4/
Please set the fftempdir as existing directory.
And please use ‘/’ rather than '\ ’ to seperate the directories in R
Thanks! But here is my code, and I don’t even know why the message said ‘\’ instead of ‘/’.
# The folder where the study intermediate and result files will be written:
outputFolder <- "./result4/"
# Specify where the temporary files (used by the ff package) will be created:
options(fftempdir = "./tmp4/")
Thanks! The path error disappeared, but the ‘cohortMethodDataFolder’ error is still there.
I double-checked, ‘cohortMethodDataFolder’ column is missing in outcomeModelReference.rds.
Exporting analyses
- cohort_method_analysis table
- covariate_analysis table
Warning: warning: Unknown or uninitialised column: `cohortMethodDataFolder`.
Error in if (!file.exists(file)) stop("Cannot find file ", file) :
argument is of length zero
Warning: Could not find logger DEFAULT
Hello @yupengli, @schuemie I understand that this error is from a very long back ago. I am facing the same issue when running a study package. Any recall how you were able to clear this error.