if (FALSE) {
# assign a resource asynchronously
datashield.assign.resource(conn, symbol="rsrc", resource="RSRC.CNSIM1")
# assign a resource synchronously
datashield.assign.resource(conn, symbol="rsrc", resource="RSRC.CNSIM1", async = FALSE)
# assign the tables that are defined in the logindata ('server' and 'resource' columns are
# expected) data frame that is used in datashield.login() function. Connections names
# and server names must match.
datashield.assign.resource(conns, "rsrc", logindata)
# assign the resources that are defined in the provided named list.
# Connections are filtered by the list names.
datashield.assign.resource(conns, "rsrc",
list(server1="RSRC.CNSIM1", server2="RSRC.CNSIM2"))
# do assignment with callback functions
datashield.assign.resource(conn, symbol="rsrc",
resource = list(server1="RSRC.CNSIM1", server2="RSRC.CNSIM2"),
success = function(server) {
# do something with server's success
},
error = function(server, error) {
# do something with server's error message
})
}
Run the code above in your browser using DataLab