OHDSI Home | Forums | Wiki | Github

R code error message

(Hyeyeon Cho) #1

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?


(Kristin Kostka, MPH) #2

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.


(Seng Chan You) #3

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

(James Weaver) #4

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:

(Kristin Kostka, MPH) #5

@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.

(Martijn Schuemie) #6

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