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

Error in step_03_01_T2.2_internal_consistency_for_prompts.R" #43

Closed frasansa closed 2 years ago

frasansa commented 2 years ago

Dear @GiorgioLimoncella,

We have ran the script without errors, but then we found that the information of the EOS origin table was not etl'd properly into Survey Observations. We have fixed it, but now we have the following error when running the algorithm:

source(paste0(thisdir,"/p_steps_pregnancy/step_03_01_T2.2_internal_consistency_for_prompts.R")) Error in vecseq(f, len, if (allow.cartesian || notjoin || !anyDuplicated(f__, : Join results in 3508637 rows; more than 2382493 = nrow(x)+nrow(i). Check for duplicate key values in i each of which join to the same group in x over and over again. If that's ok, try by=.EACHI to run j for each group to avoid the large allocation. If you are sure you wish to proceed, rerun with allow.cartesian=TRUE. Otherwise, please search for this error message in the FAQ, Wiki, Stack Overflow and data.table issue tracker for advice.

What do you think? Thanks in advance, Francisco.

clobart commented 2 years ago

Hi @frasansa,

This error always occurs when you try to merge non-unique datasets, is it possible that you have any duplicates in SURVEY_OBSERVATIONS_EOS? or that persons in SURVEY_OBSERVATIONS_EOS can be linked with more than one row in PERSONS or OBSERVATION_PERIOD? Claudia

frasansa commented 2 years ago

Yes, was that. Solved, thanks!