ds.unique {dsBaseClient} | R Documentation |
Perform 'unique', from the 'base' package on a specified variable on the server-side
ds.unique(x.name = NULL, newobj = NULL, datasources = NULL)
x.name |
a character string providing the name of the varable, in the server, to perform |
newobj |
a character string that provides the name for the output object
that is stored on the data servers. Default |
datasources |
a list of |
Will create a vector or list which has no duplicate values.
Server function called: uniqueDS
ds.unique
returns the vector of unique R objects which are written to the server-side.
Stuart Wheater, DataSHIELD Development Team
## Not run:
# connecting to the Opal servers
require('DSI')
require('DSOpal')
require('dsBaseClient')
builder <- DSI::newDSLoginBuilder()
builder$append(server = "study1",
url = "http://192.168.56.100:8080/",
user = "administrator", password = "datashield_test&",
table = "CNSIM.CNSIM1", driver = "OpalDriver")
builder$append(server = "study2",
url = "http://192.168.56.100:8080/",
user = "administrator", password = "datashield_test&",
table = "CNSIM.CNSIM2", driver = "OpalDriver")
builder$append(server = "study3",
url = "http://192.168.56.100:8080/",
user = "administrator", password = "datashield_test&",
table = "CNSIM.CNSIM3", driver = "OpalDriver")
logindata <- builder$build()
connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
# Create a vector with combined objects
ds.unique(x.name = "D$LAB_TSC", newobj = "new.vect", datasources = connections)
# Clear the Datashield R sessions and logout
datashield.logout(connections)
## End(Not run)