ds.wrapper | R Documentation |
The function summarises the outcome of variable-level aggregate DataSHIELD functions.
ds.wrapper(df = "D", ds_function = NULL, datasources = NULL, save = FALSE)
df |
A data.frame on the server-side. Default is "D". |
ds_function |
The aggregate DataSHIELD function you want to run to receive information (e.g. ds.class, ds.numNA). |
datasources |
A list of |
save |
If TRUE, the output is saved in the working directory as a csv file. Default is FALSE |
ds.wrapper wraps around DataSHIELD functions and creates summaries for all variables in a data.frame, providing an improved overview for the DataSHIELD analyst.
A table with the output of the function. If more than one study is connected, they are joined in one table.
Sofia Siampani (Max-Delbrueck-Center, Berlin), Florian Schwarz (German Institute of Human Nutrition, Potsdam-Rehbruecke)
## Not run:
# Version 1.0
# Connecting to Opal Servers
# loading necessary packages
require("DSI")
require("DSOpal")
require("dsBaseClient")
require("dsSupportClient")
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()
# Log onto the remote Opal training servers
connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
# Retrieving information on variable classes in the specified data.frame
ds.wrapper(df = "D", ds_function = ds.class)
# Retrieving information on how many NAs are present in each variable in the specified data.frame
ds.wrapper(df = "D", ds_function = ds.numNA)
# Clear the Datashield R sessions and logout
datashield.logout(connections)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.