oxford-pharmacoepi / MegaStudy

4 stars 2 forks source link

problem with colnames SIDIAP #67

Closed fbarenyidi closed 3 months ago

fbarenyidi commented 5 months ago

After running the 177 line there's an issue with the colnames, there's no colname "outcome_start_date” in the "inc" dataset: see the colnames. image003

tiozab commented 5 months ago

@fbarenyidi thanks, we have seen this error here https://github.com/oxford-pharmacoepi/MegaStudy/issues/66 and it was resolved using the new renv and code provided in issue #53 (comment from May 24)

fbarenyidi commented 4 months ago

Hey Theresa, after using the DUS1point_4 script and the new r environment when I try to run the app I get this error:

image

Do you know what could be the error? Thanks

tiozab commented 4 months ago

@fbarenyidi thanks, I just re-ran the shiny with my own 1.4 results and it works. If you do not have the newest version from the shiny, please pull (and do not forget to update the database csv with your database in the shiny), if it still does not work, you will have to wait for my new code amendments. but it should work with the current version.

fbarenyidi commented 4 months ago

Dear @tiozab , I think it has to do with the following package:

Captura de pantalla 2024-07-09 a les 10 17 04

and then when the Shiny is run gives this error:

Captura de pantalla 2024-07-09 a les 10 28 00

Thanks

tiozab commented 4 months ago

@fbarenyidi has the renv worked properly ? so the DUS has not run yet? Can you give me the following package versions please:

packageVersion("dbplyr") packageVersion("CirceR") packageVersion("CDMConnector") packageVersion("IncidencePrevalence") packageVersion("CodelistGenerator") packageVersion("DrugUtilisation") packageVersion("PatientProfiles") packageVersion("omopgenerics") packageVersion("CohortCharacteristics")

fbarenyidi commented 4 months ago

packageVersion("dbplyr") [1] ‘2.5.0’ packageVersion("CirceR") [1] ‘1.3.3’ packageVersion("CDMConnector") [1] ‘1.4.0’ packageVersion("IncidencePrevalence") [1] ‘0.7.2’ packageVersion("CodelistGenerator") [1] ‘2.2.2’ packageVersion("DrugUtilisation") [1] ‘0.6.0’ packageVersion("PatientProfiles") [1] ‘1.0.0’ packageVersion("omopgenerics") [1] ‘0.2.1’ packageVersion("CohortCharacteristics") [1] ‘0.2.0’

tiozab commented 4 months ago

thanks @fbarenyidi can you send me your log from the storage folder. you are using Postgresql right? have you run the DUS_1point4.R file, right?

fbarenyidi commented 4 months ago

Yes, i run the DUS1_pont4.R file and with Postgresql. Here you have, I'm running it again if in any case there was a problem with the environment. SIDIAP_log.txt

tiozab commented 4 months ago

Thanks, the first time it stopped at demographics incident patients. does this work? inc_demographics <- cdm[["inc_pat"]] %>% addDemographics( indexDate = "cohort_start_date", age = TRUE, ageName = "age", ageGroup = list( c(0,18), c(19,64), c(65,150) ), sex = TRUE, sexName = "sex", priorObservation = FALSE, futureObservation = FALSE, )

fbarenyidi commented 4 months ago

Dear Theresa, now this step works,but it seems that we continue to have a problem when trying to generate the Shiny App. This error pops up:

image
tiozab commented 4 months ago

@fbarenyidi would you like to have a call this week or next week to go through the issues?

fbarenyidi commented 4 months ago

Hey Theresa, let me run the code again to see if we are able to solve the issue. Otherwise, would it work for you nect week? I 'll keep you informed. Thanks!

tiozab commented 4 months ago

sometime it helps to clear everything, re-start r and re-do the renv etc.

fbarenyidi commented 4 months ago

Dear @tiozab, I sent you a message on the EHDEN Teams to schedule a call.

tiozab commented 4 months ago

thank I have replied. If you can let me know in advance what the problem is I may have a better picture for helping.

fbarenyidi commented 4 months ago

Now it seems that the problem resides on the memory, you know if there would be any chance to solve this issue? image

tiozab commented 3 months ago

@fbarenyidi sorry for the late answer, I was on holiday. In case this problem cannot be resolved, please re-run the code on a random subset of your cdm https://darwin-eu.github.io/CDMConnector/reference/cdmSample.html