ARS-toscana / ConcePTIONAlgorithmPregnancies

Repository of the script of the ConcePTION Algorithm for Pregnancies
GNU Affero General Public License v3.0
5 stars 3 forks source link

LastMestrualPeriodImplyingPregnancy.RData is not created #40

Closed frasansa closed 2 years ago

frasansa commented 2 years ago

Dear @RosaMGini, @GiorgioLimoncella and @clobart,

We have the following error in VID when running the version 3.0:

source(paste0(thisdir,"/p_steps_pregnancy/step_02_03_T2.2_create_pregnancies_from_itemsets.R")) Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection In addition: Warning message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file 'D:/R_Projects/CONSIGN_L4/ConcePTIONAlgorithmPregnancies-release_3.0/g_intermediate/LastMestrualPeriodImplyingPregnancy.RData', probable reason 'No such file or directory'

It seems that LastMestrualPeriodImplyingPregnancy is not defined for VID. Thanks, Francisco.

GiorgioLimoncella commented 2 years ago

Hi @frasansa,

sorry, we inserted a new concept and forgot to update the parameters for VID. Luckily it is an easy fix! would you please add the following code to line 90 in the p_parameters_pregnancy/02_itemset/02_itemset_VID file?

### specification LastMestrualPeriodImplyingPregnancy
itemsetMED_AVpair_pregnancy[["LastMestrualPeriodImplyingPregnancy"]][[files[i]][["VID"]] <- list()

or otherwise you can download the file from github, I just updated it !

thank you very much, Giorgio

frasansa commented 2 years ago

Thanks @GiorgioLimoncella,

I will rerun it with the fix.

PS: another one bracket is needed after files[i]]:

specification LastMestrualPeriodImplyingPregnancy

itemsetMED_AVpair_pregnancy[["LastMestrualPeriodImplyingPregnancy"]][[files[i]]][["VID"]] <- list()

frasansa commented 2 years ago

Fixed!