...
- On each Opal server log into the web interface and click on Administration > DataSHIELD and select either ASSIGN or AGGREGATE (depends on your function and what it does!)
Click +Method
Add a name of server side function "xxxxx.DS"
Select R script
Paste the server function code from your xxxxx.DS.R script into the empty box
Click save Reload the new client library from your local machine. In R:
Code Block language xml library(devtools) devtools::load_all("filepath to dsBaseClient you have pulled from github on your machine")
Test the new function:
Code Block language xml #load libraries library(opal) library(dsBaseClient) library(dsStatsClient) library(dsGraphicsClient) library(dsModellingClient) #log into to the test opals data(logindata) opals <- datashield.login(logins=logindata,assign=TRUE) #run the function to test it ds.rNorm1(samp.size=25,mean=0,sd=1, newobj="newObject", datasources=NULL)