OHDSI / SelfControlledCaseSeries

An R package for performing Self-Controlled Case Series (SCCS) analyses in an observational database in the OMOP Common Data Model.
http://ohdsi.github.io/SelfControlledCaseSeries
13 stars 8 forks source link

Error with createStudyPopulation function #25

Closed Xintong-Li-ZnCu closed 2 years ago

Xintong-Li-ZnCu commented 3 years ago

I was following the instructions in the vignette 'Single studies using the SelfControlledCaseSeries package' and received the following error message ``

studyPop <- createStudyPopulation(sccsData = sccsData, outcomeId = 1, firstOutcomeOnly = FALSE, naivePeriod = 180) Error: Problem with mutate() input startAgeInDays. x must be a double vector, not an integer vector. ℹ Input startAgeInDays is case_when(...).

schuemie commented 3 years ago

Could you tell me what database platform you're using? Oracle?

Xintong-Li-ZnCu commented 3 years ago

I'm using PostgreSQL

schuemie commented 3 years ago

Could you try using the latest develop version of DatabaseConnector?:

remotes::install_github("ohdsi/DatabaseConnector", ref = "develop")

You will need to redo the data extraction (getDbSccsData) after installing the updated DatabaseConnector.

Xintong-Li-ZnCu commented 3 years ago

Thank you! it worked!

schuemie commented 2 years ago

(Note that this version of DatabaseConnector has since been released, so there's no more need to use the develop branch)