Installation steps and workflow for DataSHIELD development
- installation of ubuntu VM
sudo apt-get install r-base
sudo apt install libssl-dev sudo apt install libgit2-dev sudo apt install libxml2-utils sudo apt install libxml2-dev sudo apt-get install libcurl4-openssl-dev sudo apt-get install git
install.packages("devtools", dependencies = TRUE) install.packages("roxygen2", dependencies = TRUE) install.packages("Rtools", dependencies = TRUE)
run
install.packages('dsBaseClient', repos=c(getOption('repos'), 'http://cran.obiba.org'), dependencies=TRUE)
source('datashield_installer_basic.R')
-
Clone dsBase and modified lsDS() in a branch
https://github.com/neelsoumya/dsBase/blob/absolute_newbie/R/lsDS.R
-
The modification is a very simple Hello World:
cat('\n Hello World from server-side function lsDS() in dsBase \n') outlist <- NULL return(outlist)
- On your laptop, start VirtualBox and load dstutorial100 as outlined in the latest tutorial:
- I then authenticate in a web browser on my laptop
-
I then remove the dsBase R package in the server and install from github the version that I modified in my cloned repository
-
On my laptop, I then open R studio and run the following basic commands from Alex's recent tutorial (slightly modified since I can run only one VM):
library(DSI)
library(DSOpal)
library(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 = "study1", url = "http://192.168.56.100:8080/", user = "administrator", password = "datashield_test&", table = "CNSIM.CNSIM1", driver = "OpalDriver")
logindata <- builder$build()
connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
ds.dim(x='D', type='combine', datasources = connections)
ds.ls() Install dBaseClient from own branch
devtools::install_github(repo = "neelsoumya/dsBaseClient", ref = "absolute_newbie_client", force = TRUE)
library('dsBaseClient', lib.loc = "/home/soumya/R/x86_64-pc-linux-gnu-library/3.6", warn.conflicts = TRUE)
- In R Studio open as project then build and then test. For test use the csv file in the tests folder to connect to server VM. Use and commit NAMESPACE and DESCRIPTION files to git. These will be generated by roxygen when you build, and reinstall.