Ds.table error in parse

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
1: output.list=list(TABLE.STUDY.server2_`

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. dsBaseClient_6.2.0 DSOpal_1.3.0 DSI_1.4.0


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.


Makal, 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.


Hey Stuart,

Did you find anything related to this error? Or can I help you somehow?

Hi Makal,

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?


hi Stuart,

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.

Best regards


I have tried to figure out your problem with ds.table and I might have found something. It actually had nothing to do with the generated dataset (at least I couldn’t find anything so far).


builder <- DSI::newDSLoginBuilder(.silent = FALSE)
builder$append(server = "Server-1",  url = "",
               user = "administrator", password = "datashield_test&",
               table = "MakalTest.MakalTest5", driver = "OpalDriver")

logindata <- builder$build()
connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")

ds.table("D$var1", "D$var2")

The parsing error message (see below) comes from naming the server in the builder$append command. In my example “Server-1”. R can’t parse specific symbols (e.g. hyphen) depending on their position (r - Unexpected symbol error in parse(text = str) with hyphen after a digit - Stack Overflow).

Aggregated (tableDS(rvar.transmit = "D$var1", cvar.transmit = "D$var2", stvar.transmit = NULL, ...

 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:38: unexpected input
1: output.list=list(TABLE.STUDY.Server-1_

In ds.table codeline 452 the variable “study.names.valid” is being built from the names(datasources) command and then carried forward to into the output.text.props.counts.dim.2 variable. I have not seen it in the code yet, but perhaps also the Project or Table name in Opal could lead to problems.

Do you have any special symbols in your Server/Project/Table names?

Best, Florian

Hey Florian, I really appreciate your help! Youre right I used dash in the “Server name” like you in the example, I have removed it and I see the contingency table now :slight_smile: By the way I see that you used in this example image from workshops, I also wanted to used it, but I gave up due to an error in command connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") with error that I need https. How do you resolved it?

Thank you for your help

Hi Makal,

I just figured that problem out today as I recently updated everything in R. The trick is to go down on the opalr Version to 3.0.2 or lower (Releases · obiba/opalr · GitHub) as the newest version enforces the https usage.

devtools::install_github("obiba/opalr", ref = "3.0.2")

And I think, Stuart mentioned to me that Opal needs to be below 4.1. But most VM Images are below that Version.

My Client-side: DSI: 1.4.0 DSOpal: 1.3.1 dsBaseClient: 6.2.0 opalr: 3.0.2

Best, Florian

Be aware that if you go with http (i.e. non secure) your credentials will travel in clear over the network… If you connect to http://localhost:8080 only a warning will be issued.