OHDSI Home | Forums | Wiki | Github

R code error message

Hello, I am trying to run R code which was generated in Estimation and got the error message as below.

execute(connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTable,
oracleTempSchema = oracleTempSchema,
outputFolder = outputFolder,
databaseId = databaseId,
databaseName = databaseName,
databaseDescription = databaseDescription,
createCohorts = TRUE,
synthesizePositiveControls = TRUE,
runAnalyses = TRUE,
runDiagnostics = TRUE,
packageResults = TRUE,
maxCores = maxCores)

Error: ‘createTargetComparatorOutcomes’ is not an exported object from ‘namespace:CohortMethod’

Does anyone familiar with this error and any ideas how to solve it?

Thanks!

Hi @hcho! I see you’ve been working a lot with the Estimation package.

I don’t know this exact error but I am happy to try to help. Do you have a study package you could share via GitHub or put into public ATLAS? I can try to rerun inside my environment to see if I can recreate this.

Best,
Kristin

I think this comes from incompatible versioning issue in OHDSI ecosystem. Maybe between ATLAS and CohortMethod

1 Like

Hi @hcho, the version of CohortMethod you have installed in out of date. update to the current version and that problem will resolve. The estimation skeleton includes the function CohortMethod::createTargetComparatorOutcomes whereas your version probably includes CohortMethod::createDrugComparatorOutcomes. If the problem remains, please write back :slight_smile:

1 Like

@jweave17 Great tribal knowledge – we should make sure we’re documenting this nugget. I can’t remember… is there a “cheat sheet for PLE” anywhere? Maybe in a tutorial? Feels like we should have a quick list of “common challenges faced when running PLE”. I know @mattspotnitz’s found a couple that ended up in the Book of OHDSI.

1 Like

In this case the study package could have provided an informative error. I added this issue that will achieve this in the future.

t