Unexpected R server error?

Now it works… The problem was that while trying to reproduce Patricia’s problem, I pasted her R script as-is and I got “R parser: syntax error”. It happens that if you look carefully, her script contains windows weird quotes:


> subset(datashield.methods(conns, type = "aggregate"), is.na(package))
           name      type  class                                                          value package version server
1  DANGER_Error aggregate script                    function() {\n  stop(“SERVER::ERR:0001”)\n}    <NA>    <NA> study1
36        is_in aggregate script function(x, v) {\n  y = ifelse(x %in% v, 1, 0)\n  return(y)\n}    <NA>    <NA> study1

Those non-ascii quotes are not supported, it makes the R parser error. I replaced them by the ascii’s double quotes " and it works.

Note that when calling for a custom R function, all the custom R functions are applied to the R server session environment (because one function could call another one). Then despite the function called is correct, another one could be wrong.

Yannick

1 Like