Hi, I try to create 2d contingency table with ds.table from dsBaseClient and it throws me error in parse:
` Aggregated (tableDS(rvar.transmit = "D$var1", cvar.transmit = "D$var2", ) [==========] 100% / 1s
Data in all studies were valid
Study 1 : No errors reported from this study
Error in parse(text = output.text.props.counts.dim.2) :
<text>:1:47: unexpected input
Ive checked it on opal-demo.obiba.org and on that server it works fine, so my suspicions are related to the original data. I have integers in those two variables with some empty cells/values.
Does somebody encountered similar error, or has any idea how to deal with it. The error response is not clear enough for me.
my initial impression is you have found a bug (on line 1454 of ds.table.R: the text of the remote invocation appears to be malformed). I will see if I can identify a work-around.
Please could you send the text of the original call to ds.table(…) so we can create an accurate test for this situation.
Makal, could try using ds.table2D as a work-around. The issue appears to be more subtle that I originally thought, does any of the variable you are specifying contain unusual characters?
Thanks for your reply Stuart
The call is
builder$append(server = "xxx", url = "yyy", user = "xxx", password = "yyy", driver = "OpalDriver", options='list(ssl_verifyhost=0, ssl_verifypeer=0)', table = "xxx.yyy")
logindata <- builder$build()
connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
Variables in those 2 ‘columns’ are integers from range <1,3>. Some cells are empty.
Response from the same dataset using dstable2D
"Command 'table2DDS(D$var1,D$var2)' failed on '2': Error while evaluating 'dsBase::table2DDS(D$var1, D$var2)' -> Error in `[.default`(aa, i, ) : subscript out of bounds\n"
What is interesting, is the fact that I used another variables (var3,var4) for dstable I got the same parse error, but with dstable2D it returned me contingency tables.
Thank you, I was expecting a more complicated call to “ds.table”, I will continue to try to reproduce the issue. I will ensure the tests only involve a single server.
Did you find anything related to this error? Or can I help you somehow?
I haven’t been able to reproduce the problems. My configurations is:
Client-side: R 4.2.1, DSI 1.4.0, DSOpal 1.4.1, dsBaseClient 6.2.0
Server-side: Opal 4.4.10, dsBase 6.2.0
Does this differ from your configuration?
Server-side: Opal 4.4.9, dsBase 6.2.0
Client-side: R 4.1.3 DSI 1.4.0 DSOpal 1.3.1 dsBaseClient 6.2.0
I would like to share some toughts regarding that error and how I encounter it.
I log in to the datashield UI on administrator profile, then I go to the proper table and choose
Summary tab. Then I have red bar that
Table values index is out-of-date, so I choose
Index now. Therefore I can create a contingency table by selecting two variables. Before that I go to the variables and I add a categories by choosing
Discover option. Once I have it, I do a contingency table and I receive 2 tables based on Frequency and Percentage.
Then I want to do the same in RStudio. Therefore, I log in on the same user, perform code written above and I receive an error above with error in parse. Regarding data and additional configuration:
Regarding data and additional configuration:
- my table consists with 2 variables (integers) with about 200 rows of generated random values in a range <1,10>.
- nfilter.tab was set to 1 for testing purpose.
Question: What does it mean that
Table values index is out-of-date in Datashield UI console?
Based on that I am a little bit confused that I receive different results (tables in Datashield UI console and an error in Rstudio). Now my assumptions are that the configuration of variables are wrong or something is missing in server configuration. Is there any document how to proper configure variables and upload data, because I could missed it.