Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

In Horizontal DataSHIELD pooled analysis the data are harmonized and the variables given the same names across the studies, as agreed by all data providers.

Assign individual variables on login

Users can specify individual variables to assign to the server-side R session. It is best practice to first create a list of the Opal variables you want to analyse.

  • The example below creates a new variable myvar that lists the Opal variables required for analysis: LAB_HDL and GENDER 
  • The variables argument in the function datashield.login uses myvar , which then will call only this list.
Code Block
languagexml
myvar <- list('LAB_HDL', 'GENDER')
opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar)

#Logging into the collaborating servers

#Assigining data:
#study1...
#study2...

#Variables assigned:
#study1--LAB_HDL, GENDER
#study2--LAB_HDL, GENDER
Info
titleThe format of assigned data frames

Assigned data are kept in a data frame (table) named D by default. Each row of the data frame are the individual records and each column is a separate variable.

  • The example below uses the argument symbol in the datashield.login function to change the name of the data frame from D to mytable .
Code Block
languagexml
myvar <- list('LAB_HDL', 'GENDER')
opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar, symbol='mytable')

#Logging into the collaborating servers

#Assigining data:
#study1...
#study2...

#Variables assigned:
#study1--LAB_HDL, GENDER
#study2--LAB_HDL, GENDER
Note

Only DataSHIELD developers will need to change the default value of the last argument, directory, of the datashield.login function.

 

====================

 

 

 

 

 

Tip

If you have not installed the DataSHIELD test environment you can login to our cloud Opal test servers using the alternative details below. This will require a good internet connection. Please note this service is not reliable and will be discontinued soon.

Code Block
xml
xml
opals <- datashield.login(logins=login_remoteServer,assign=TRUE)

The login template for the cloud Opal test servers can be called using:

Code Block
data(login_remoteServer)