Opal R Client for theOpal datawarehouse. Most of the web services of Opal can be reached by anopalr function: import/export, data dictionaries, projects,tables, resources, permissions, users, DataSHIELD profiles etc.
Installation:
# install from CRANinstall.packages("opalr")# or install latest development versionremotes::install_github("obiba/opalr")Basic usage:
library(opalr)o <- opal.login('administrator', 'password', url = 'https://opal-demo.obiba.org')# assign a table (as a data.frame) to a R symbolopal.assign(o, 'D', 'CNSIM.CNSIM1')# perform R operations on the server sideopal.execute(o, 'summary(D$GENDER)')opal.execute(o, 'summary(D$LAB_GLUC)')opal.logout(o)Some helper options can be defined to control default values andbehavior:
opal.username, the login user name (default isNULL).opal.password, the login user password (default isNULL).opal.token, the login personal access token (default isNULL).opal.url, the login Opal URL (default isNULL).opal.opts, the curl options (default isNULL), seehttr::httr_options.opal.profile, the login profile (R servers clustername) (default isNULL).opal.progress, whether to show progress bar (default isTRUE).opal.progress.clear, whether to clear progress barafter it is completed (default isFALSE).opal.retry.times, the maximum number of GET requests toattempt (default is3, no retry when value is1).opal.retry.quiet, whether to print a message displayinghow long until the next request (default isFALSE).See theDSOpaldocumentation.