Studyside error messages

Hi,

I’m trying to recode a variable but get a strange message - about “serversideMessage(s)”.

 R> ds.recodeValues(                                                                                                                                                                                                                                                                                                           
 + var.name = "intention_num_antenat",                                                                                                                                                                                                                                                                                         
 + values2replace.vector = c(0,1,2,3),                                                                                                                                                                                                                                                                                         
 + new.values.vector = c(0,1,1,1),                                                                                                                                                                                                                                                                                             
 + newobj = "intention_bin_antenat",                                                                                                                                                                                                                                                                                           
 + datasources = working                                                                                                                                                                                                                                                                                                       
 + )                                                                                                                                                                                                                                                                                                                           
   Aggregated (recodeValuesDS1("intention_num_antenat", "0,1,2,3", "0,1,1,1")) [==========] 100% / 2s
   Assigned expr. (intention_bin_antenat <- recodeValuesDS2("intention_num_antenat", "0,1,2,3", "0...                                                                                                                                                                                                                          
   Aggregated (testObjExistsDS("intention_bin_antenat")) [================================] 100% / 1s
   Aggregated (messageDS("intention_bin_antenat")) [======================================] 100% / 1s
 $is.object.created
 [1] "A data object <intention_bin_antenat> has been created in all specified data sources"

 $validity.check
 [1] "<intention_bin_antenat> invalid in at least one source. See studyside.messages:"

 $studyside.messages
 $studyside.messages$STUDY1
 [1] "NOT ALL OK: there are studysideMessage(s) on this datasource"

 $studyside.messages$STUDY2
 [1] "NOT ALL OK: there are studysideMessage(s) on this datasource"

Any suggestions about how to debug in greater detail? I have recoded a different variable (from 3 to 2 levels) with no problem. I’ve spent time with several other people, including who have access server (study) side - but nothing is reported there either.

Hi Andrei,

Can you try to use a shorter name for the variables intention_num_antenat and intention_bin_antenat? The problem here might be related to the allowed maximum length of characters.

Hi Demetris,

Would this be related to the stringShort filter? Because that is currently set to 20 (default) in the servers @asm is using, so I guess that would explain it. Although from looking at the code, we should be able to see a message Error: var.name.text argument too long (see nfilter.stringShort), right?

Hi @gfcg,

Yes, that’s right. It is related to the stringShort filter which is set to 20 characters by default. And yes that specific error message is what iis returned from the latest version of the function (version 6.1.1). I think in RECAP you are still using a previous version of the dsBase/dsBaseClient packages?

Yes, we are still on 6.1.0, so that explains why we don’t see the error. Thanks!

Thanks all :slight_smile:

And, just to confirm - it seems to work. But I hit another problem. In fact, I wanted to do:

!R> ds.table(rvar="baseline$multiple", datasources = working)
   Aggregated (asFactorDS1("baseline$multiple")) [========================================] 100% / 2s
   Aggregated (tableDS(rvar.transmit = "baseline$multiple", cvar.transmit = NULL, ) [=====] 100% / 1s

  Data in all studies were valid

 Study 1 :  No errors reported from this study
 Study 2 :  No errors reported from this study

 $output.list
 $output.list$TABLE_rvar.by.study_row.props
                  study
 baseline$multiple      1      2
                1  0.7498 0.2502
                2  0.7225 0.2775
                3  0.8000 0.2000
                4  1.0000 0.0000
                NA 1.0000     NA

 $output.list$TABLE_rvar.by.study_col.props
                  study
 baseline$multiple     1      2
                1  0.833 0.8249
                2  0.138 0.1573
                3  0.024 0.0178
                4  0.004 0.0000
                NA 0.001     NA

 $output.list$TABLE_rvar.by.study_counts
                  study
 baseline$multiple   1   2
                1  833 278
                2  138  53
                3   24   6
                4    4   0
                NA   1  NA

 $output.list$TABLES.COMBINED_all.sources_proportions
 baseline$multiple
       1       2       3       4      NA
 0.83200 0.14300 0.02250 0.00299      NA

 $output.list$TABLES.COMBINED_all.sources_counts
 baseline$multiple
    1    2    3    4   NA
 1111  191   30    4   NA


 $validity.message
 [1] "Data in all studies were valid"

 Warning message:
 In etas == tss :
   longer object length is not a multiple of shorter object length
 R>
R> ds.recodeValues(                                                                                                                                                                                                                                                                                                           
 +   var.name = "baseline$multiple",                                                                                                                                                                                                                                                                                           
 +   values2replace.vector = c(1,2,3,4),                                                                                                                                                                                                                                                                                       
 +   new.values.vector = c(0,1,1,1),                                                                                                                                                                                                                                                                                           
 +   newobj = "multiple_bin",                                                                                                                                                                                                                                                                                                  
 +   notify.of.progress = TRUE,                                                                                                                                                                                                                                                                                                
 + ##  force.output.format = "factor",                                                                                                                                                                                                                                                                                         
 +   datasources = working                                                                                                                                                                                                                                                                                                     
 + )                                                                                                                                                                                                                                                                                                                           
   Aggregated (recodeValuesDS1("baseline$multiple", "1,2,3,4", "0,1,1,1")) [==============] 100% / 1s
   Assigned expr. (multiple_bin <- recodeValuesDS2("baseline$multiple", "1,2,3,4", "0,1,1,1", TRUE...

 Source 1
  Recoding undertaken without problems


 Source 2
  Recoding undertaken without problems

   Aggregated (testObjExistsDS("multiple_bin")) [=========================================] 100% / 1s
   Aggregated (messageDS("multiple_bin")) [===============================================] 100% / 1s
 $is.object.created
 [1] "A data object <multiple_bin> has been created in all specified data sources"

 $validity.check
 [1] "<multiple_bin> appears valid in all sources"

 R>
 R> ds.table(rvar="multiple_bin", datasources = working)
   Aggregated (asFactorDS1("multiple_bin")) [=============================================] 100% / 2s
   Aggregated (tableDS(rvar.transmit = "multiple_bin", cvar.transmit = NULL, ) [==========] 100% / 1s

  Data in all studies were valid

 Study 1 :  No errors reported from this study
 Study 2 :  No errors reported from this study

 $output.list
 $output.list$TABLE_rvar.by.study_row.props
             study
 multiple_bin      1      2
           1  0.7378 0.2622
           NA 0.7500 0.2500

 $output.list$TABLE_rvar.by.study_col.props
             study
 multiple_bin     1      2
           1  0.166 0.1751
           NA 0.834 0.8249

 $output.list$TABLE_rvar.by.study_counts
             study
 multiple_bin   1   2
           1  166  59
           NA 834 278

 $output.list$TABLES.COMBINED_all.sources_proportions
 multiple_bin
     1    NA
 0.168 0.832

 $output.list$TABLES.COMBINED_all.sources_counts
 multiple_bin
    1   NA
  225 1112


 $validity.message
 [1] "Data in all studies were valid"

 R>

To clarify, I wanted to change 1 → 0 and (2,3,4) → 1. But it seems to have convert the (original) 1s to NA.

By the way, I should make it in the morning to the drop-in session, so we can discuss there. Then I can answer the question here :slight_smile:

Thanks!

@gfcg Yes, that’s why you don’t see the message!

@asm this is another bug that I fixed in version 6.1.1!

Great! It’s a good poke for @gfcg and INESC TEC collaborators then!

1 Like

@asm I’ve updated the two servers you are using, but we’ll have to ask the partners to update theirs.

1 Like