if (FALSE) {
# call aggregate function on server side asynchronously
# i.e. each study connection will process the request in parallel
result <- datashield.aggregate(conns, expr = quote(someFunction(D, 123)))
# call aggregate function on server side synchronously, i.e. each study
# connection will be called, one after the other, in a blocking way
result <- datashield.aggregate(conns, expr = quote(someFunction(D, 123)), async = FALSE)
# call aggregate functions that are defined in the provided named list.
# Connections are filtered by the list names.
result <- datashield.aggregate(conns,
list(server1=quote(someFunction(D, 123)), server2=quote(someFunction(G, 456))))
# call aggregate function with callback functions
result <- datashield.aggregate(conns, expr = quote(someFunction(D, 123)),
success = function(server, res) {
# do something with server's result value
},
error = function(server, error) {
# do something with server's error message
})
}
Run the code above in your browser using DataLab