diff --git a/docs/404.html b/docs/404.html index 8bd8d7e9..e0c4cf7c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -106,7 +106,7 @@
vignettes/datashield-admin.Rmd
datashield-admin.Rmd
Setup the connection with Opal:
-library(opalr)
-o <- opal.login("administrator", "password", "https://opal-demo.obiba.org")
library(opalr)
+o <- opal.login("administrator", "password", "https://opal-demo.obiba.org")
+dsadmin.package_descriptions(o, profile = "default")
Install a DataSHIELD R package from the configured CRAN repositories (most likely the DataSHIELD repo):
-dsadmin.install_package(o, pkg = "dsBase", profile = "default")
dsadmin.install_package(o, pkg = "dsBase", profile = "default")
R packages which source code is one GitHub can be installed directly:
-dsadmin.install_github_package(o, pkg = "dsSurvival", username = "neelsoumya", ref = "v1.0.0", profile = "default")
dsadmin.install_github_package(o, pkg = "dsSurvival", username = "neelsoumya", ref = "v1.0.0", profile = "default")
When developing a new DataSHIELD R package, it can be built and installed as follow (from the root of the R package source directory):
-dsadmin.install_local_package(o, devtools::build(), profile = "default")
dsadmin.install_local_package(o, devtools::build(), profile = "default")
To remove a DataSHIELD R package:
-dsadmin.remove_package(o, pkg = "dsSurvival", profile = "default")
dsadmin.remove_package(o, pkg = "dsSurvival", profile = "default")
Note that removing a package does not update the DataSHIELD settings of the associated profiles. See the following sections to administrate the profiles and their settings.
@@ -164,26 +164,26 @@To list the DataSHIELD profiles:
-dsadmin.profiles(o)
dsadmin.profiles(o)
To create a new DataSHIELD profile, to initialize it the DataSHIELD settings as declared by the installed packages and to enable it, use the following.
-# ensure the profile does not exist
-if (dsadmin.profile_exists(o, "demo"))
- dsadmin.profile_delete(o, "demo")
-# create a profile, disabled
-dsadmin.profile_create(o, "demo", cluster = "default")
-# make only dsBase and resourcer packages visible
-dsadmin.profile_init(o, "demo", packages = c("dsBase", "resourcer"))
-# ready to be used
-dsadmin.profile_enable(o, "demo")
# ensure the profile does not exist
+if (dsadmin.profile_exists(o, "demo"))
+ dsadmin.profile_delete(o, "demo")
+# create a profile, disabled
+dsadmin.profile_create(o, "demo", cluster = "default")
+# make only dsBase and resourcer packages visible
+dsadmin.profile_init(o, "demo", packages = c("dsBase", "resourcer"))
+# ready to be used
+dsadmin.profile_enable(o, "demo")
When a DataSHIELD R package is installed but should be used only by a restricted group of users, proceed as follow:
-dsadmin.profile_perm_add(o, "demo", subject = "testers", type = "group")
-# verify permissions
-dsadmin.profile_perm(o, "demo")
dsadmin.profile_perm_add(o, "demo", subject = "testers", type = "group")
+# verify permissions
+dsadmin.profile_perm(o, "demo")
To list the aggregation functions:
-dsadmin.get_methods(o, type = "aggregate", profile = "demo")
dsadmin.get_methods(o, type = "aggregate", profile = "demo")
Fully custom settings can be defined (useful for developers).
-dsadmin.set_method(o, "hello", func = function(x) { paste0("Hello ", x, "!") }, type = "aggregate", profile = "demo")
-# verfiy custom method
-dsadmin.get_method(o, "hello", type = "aggregate", profile = "demo")
dsadmin.set_method(o, "hello", func = function(x) { paste0("Hello ", x, "!") }, type = "aggregate", profile = "demo")
+# verfiy custom method
+dsadmin.get_method(o, "hello", type = "aggregate", profile = "demo")
A simple test of our custom hello()
function would
be:
-library(DSOpal)
-builder <- DSI::newDSLoginBuilder()
-builder$append(server = "study1", url = "https://opal-demo.obiba.org",
- user = "administrator", password = "password",
- profile = "demo")
-logindata <- builder$build()
-conns <- DSI::datashield.login(logins = logindata)
-# call the hello() function on the R server
-datashield.aggregate(conns, expr = quote(hello('friends')))
-datashield.logout(conns)
library(DSOpal)
+builder <- DSI::newDSLoginBuilder()
+builder$append(server = "study1", url = "https://opal-demo.obiba.org",
+ user = "administrator", password = "password",
+ profile = "demo")
+logindata <- builder$build()
+conns <- DSI::datashield.login(logins = logindata)
+# call the hello() function on the R server
+datashield.aggregate(conns, expr = quote(hello('friends')))
+datashield.logout(conns)
The DataSHIELD R options affects the behaviour of some methods.
To modify an R option:
-dsadmin.set_option(o, "datashield.privacyLevel", "10", profile = "demo")
-# verify options
-dsadmin.get_options(o, profile = "demo")
dsadmin.set_option(o, "datashield.privacyLevel", "10", profile = "demo")
+# verify options
+dsadmin.get_options(o, profile = "demo")
To set the legacy R parser:
-dsadmin.profile_rparser(o, "demo", rParser = "v1")
dsadmin.profile_rparser(o, "demo", rParser = "v1")
-if (oadmin.user_exists(o, "userx"))
- oadmin.user_delete(o, "userx")
-# generated password
-password <- oadmin.user_add(o, "userx", groups = c("demo", "datashield"))
-# verify user
-subset(oadmin.users(o), name == "userx")
if (oadmin.user_exists(o, "userx"))
+ oadmin.user_delete(o, "userx")
+# generated password
+password <- oadmin.user_add(o, "userx", groups = c("demo", "datashield"))
+# verify user
+subset(oadmin.users(o), name == "userx")
-lapply(opal.tables(o, "CNSIM")$name, function(table) {
- opal.table_perm_add(o, "CNSIM", table, subject = "demo", type = "group", permission = "view")
-})
-# verify table permissions
-opal.table_perm(o, "CNSIM", "CNSIM1")
lapply(opal.tables(o, "CNSIM")$name, function(table) {
+ opal.table_perm_add(o, "CNSIM", table, subject = "demo", type = "group", permission = "view")
+})
+# verify table permissions
+opal.table_perm(o, "CNSIM", "CNSIM1")
Similarly, permissions to use all the resources of a project in a DataSHIELD context is even simpler:
-opal.resources_perm_add(o, "RSRC", subject = "demo", type = "group", permission = "view")
-# verify permissions
-opal.resources_perm(o, "RSRC")
opal.resources_perm_add(o, "RSRC", subject = "demo", type = "group", permission = "view")
+# verify permissions
+opal.resources_perm(o, "RSRC")
Then grant permission to use the DataSHIELD service to a group of users:
-dsadmin.perm_add(o, subject = "datashield", type = "group", permission = "use")
-# verify permissions
-dsadmin.perm(o)
dsadmin.perm_add(o, subject = "datashield", type = "group", permission = "use")
+# verify permissions
+dsadmin.perm(o)
Note that it is also possible to grant permission to access a specific DataSHIELD profile (see Profiles section).
@@ -296,7 +296,7 @@
-opal.logout(o)
opal.logout(o)
@@ -317,7 +317,7 @@ Site built with pkgdown 2.0.6.
+Site built with pkgdown 2.0.7.
diff --git a/docs/articles/index.html b/docs/articles/index.html index ab9919fd..501db9f7 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -84,7 +84,7 @@vignettes/opal-files.Rmd
opal-files.Rmd
Setup the connection with Opal:
-library(opalr)
-o <- opal.login("administrator", "password", "https://opal-demo.obiba.org")
library(opalr)
+o <- opal.login("administrator", "password", "https://opal-demo.obiba.org")
Download a file:
-opal.file_download(o, "/home/administrator/CNSIM.zip")
opal.file_download(o, "/home/administrator/CNSIM.zip")
Download a file, protected by a password:
-opal.file_download(o, "/home/administrator/CNSIM.zip", "CNSIM-encrypted.zip", key="ABCDEFGHIJKL")
opal.file_download(o, "/home/administrator/CNSIM.zip", "CNSIM-encrypted.zip", key="ABCDEFGHIJKL")
Upload the file at another location:
-opal.file_upload(o, "CNSIM.zip", "/projects/CNSIM")
opal.file_upload(o, "CNSIM.zip", "/projects/CNSIM")
Create a folder and list folder content:
-fooDir <- paste0("/projects/CNSIM/foo-", sample(10000:99999, 1))
-opal.file_mkdir(o, fooDir)
-opal.file_ls(o, "/projects/CNSIM")
fooDir <- paste0("/projects/CNSIM/foo-", sample(10000:99999, 1))
+opal.file_mkdir(o, fooDir)
+opal.file_ls(o, "/projects/CNSIM")
Move file to the new folder and list folder content:
-opal.file_mv(o, "/projects/CNSIM/CNSIM.zip", fooDir)
-opal.file_ls(o, fooDir)
opal.file_mv(o, "/projects/CNSIM/CNSIM.zip", fooDir)
+opal.file_ls(o, fooDir)
Rename the new folder and list folder content:
-barDir <- paste0("/projects/CNSIM/bar-", sample(10000:99999, 1))
-opal.file_mv(o, fooDir, barDir)
-opal.file_ls(o, "/projects/CNSIM")
barDir <- paste0("/projects/CNSIM/bar-", sample(10000:99999, 1))
+opal.file_mv(o, fooDir, barDir)
+opal.file_ls(o, "/projects/CNSIM")
Extract the content of the archive file into a folder:
-out <- opal.file_unzip(o, paste0(barDir, "/CNSIM.zip"), barDir)
-opal.file_ls(o, out)
out <- opal.file_unzip(o, paste0(barDir, "/CNSIM.zip"), barDir)
+opal.file_ls(o, out)
Write a file from the Opal file system into the R server session workspace:
-opal.file_write(o, paste0(barDir, "/CNSIM.zip"))
-opal.execute(o, "list.files()")
opal.file_write(o, paste0(barDir, "/CNSIM.zip"))
+opal.execute(o, "list.files()")
Read back the file into the Opal file system:
-opal.file_read(o, "CNSIM.zip", paste0(barDir, "/ds.zip"))
-opal.file_ls(o, barDir)
opal.file_read(o, "CNSIM.zip", paste0(barDir, "/ds.zip"))
+opal.file_ls(o, barDir)
Remove created folder and list folder content:
-opal.file_rm(o, barDir)
-opal.file_ls(o, "/projects/CNSIM")
opal.file_rm(o, barDir)
+opal.file_ls(o, "/projects/CNSIM")
Good practice is to free server resources by sending a logout request:
-# clean server side
-opal.logout(o)
-# clean client side
-unlink("CNSIM-encrypted.zip")
-unlink("CNSIM.zip")
# clean server side
+opal.logout(o)
+# clean client side
+unlink("CNSIM-encrypted.zip")
+unlink("CNSIM.zip")
Create a project, linked to a database (default or first one):
-if (opal.project_exists(o, "dummy"))
- opal.project_delete(o, "dummy")
-opal.project_create(o, "dummy", database = TRUE)
-opal.project(o, "dummy")
if (opal.project_exists(o, "dummy"))
+ opal.project_delete(o, "dummy")
+opal.project_create(o, "dummy", database = TRUE)
+opal.project(o, "dummy")
Backup a project and download the backup archive (encrypted):
-opal.project_backup(o, 'CNSIM', '/home/administrator/backup/CNSIM')
-opal.file_download(o, '/home/administrator/backup/CNSIM', '/tmp/CNSIM.zip', key = "12345abcdef")
opal.project_backup(o, 'CNSIM', '/home/administrator/backup/CNSIM')
+opal.file_download(o, '/home/administrator/backup/CNSIM', '/tmp/CNSIM.zip', key = "12345abcdef")
Restore a project from an uploaded (and encrypted) archive:
-opal.file_upload(o, '/tmp/CNSIM.zip', '/home/administrator')
-opal.project_restore(o, 'dummy', '/home/administrator/CNSIM.zip', key = "12345abcdef")
-# verify tables
-opal.tables(o, "CNSIM")
opal.file_upload(o, '/tmp/CNSIM.zip', '/home/administrator')
+opal.project_restore(o, 'dummy', '/home/administrator/CNSIM.zip', key = "12345abcdef")
+# verify tables
+opal.tables(o, "CNSIM")
List the tables in a project, with their count of variables and entities:
-opal.tables(o, "CNSIM", counts = TRUE)
opal.tables(o, "CNSIM", counts = TRUE)
The table object can be retrieved as follow:
-opal.table(o, "CNSIM", "CNSIM1", counts = TRUE)
opal.table(o, "CNSIM", "CNSIM1", counts = TRUE)
The existence of a table can be checked:
-opal.table_exists(o, "CNSIM", "CNSIM1")
opal.table_exists(o, "CNSIM", "CNSIM1")
And more specifically, verify whether a table is a view or not:
-opal.table_exists(o, "CNSIM", "CNSIM1", view = TRUE)
opal.table_exists(o, "CNSIM", "CNSIM1", view = TRUE)
A table can be created, either as a raw table or a view. To create a view, specify which tables are referred:
-# drop table if it exists
-opal.table_delete(o, "CNSIM", "CNSIM123")
-# then create a view, no variables
-opal.table_create(o, "CNSIM", "CNSIM123", tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))
# drop table if it exists
+opal.table_delete(o, "CNSIM", "CNSIM123")
+# then create a view, no variables
+opal.table_create(o, "CNSIM", "CNSIM123", tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))
-opal.variables(o, "CNSIM", "CNSIM1")
opal.variables(o, "CNSIM", "CNSIM1")
It is also possible to get the full data dictionary of a table, as separate data frames of variables and categories. This is the recommended format for working with a data dictionary:
-dico <- opal.table_dictionary_get(o, "CNSIM", "CNSIM1")
-dico$variables
-dico$categories
dico <- opal.table_dictionary_get(o, "CNSIM", "CNSIM1")
+dico$variables
+dico$categories
Here we modify the data dictionary by appending a derivation script to each of the variables:
-dico$variables$script <- paste0("$('", dico$variables$name, "')")
-dico$variables
dico$variables$script <- paste0("$('", dico$variables$name, "')")
+dico$variables
Then we apply this derived variables dictionary to the view we have previously created and verify the counts of columns (variables) and rows (entities) in this table:
-opal.table_dictionary_update(o, "CNSIM", "CNSIM123", variables = dico$variables, categories = dico$categories)
-opal.table(o, "CNSIM", "CNSIM123", counts = TRUE)
opal.table_dictionary_update(o, "CNSIM", "CNSIM123", variables = dico$variables, categories = dico$categories)
+opal.table(o, "CNSIM", "CNSIM123", counts = TRUE)
Assign this view to a symbol in the R server, and get the summary statics:
-opal.assign(o, "D", "CNSIM.CNSIM123")
-opal.execute(o, "summary(D)")
opal.assign(o, "D", "CNSIM.CNSIM123")
+opal.execute(o, "summary(D)")
Get the values in a table for a specific Participant entity:
-opal.valueset(o, "CNSIM", "CNSIM123", identifier = "1454")
opal.valueset(o, "CNSIM", "CNSIM123", identifier = "1454")
Get all the values of a table in our local R session as a data.frame (tibble) object:
-cnsim1 <- opal.table_get(o, "CNSIM", "CNSIM1")
-cnsim2 <- opal.table_get(o, "CNSIM", "CNSIM2")
-cnsim3 <- opal.table_get(o, "CNSIM", "CNSIM3")
cnsim1 <- opal.table_get(o, "CNSIM", "CNSIM1")
+cnsim2 <- opal.table_get(o, "CNSIM", "CNSIM2")
+cnsim3 <- opal.table_get(o, "CNSIM", "CNSIM3")
Then do some alterations on this data.frame and save it back as a raw table:
-# make sure IDs are unique
-cnsim1$id <- paste0(cnsim1$id, "-1")
-cnsim2$id <- paste0(cnsim2$id, "-2")
-cnsim3$id <- paste0(cnsim3$id, "-3")
-# bind tables
-cnsim123 <- rbind(cnsim1, cnsim2, cnsim3)
-# remove some columns
-cnsim123$DIS_AMI <- NULL
-cnsim123$DIS_CVA <- NULL
-cnsim123$DIS_DIAB <- NULL
-# save as a raw table
-opal.table_save(o, cnsim123, "CNSIM", "CNSIM", overwrite = TRUE, force = TRUE)
-opal.table(o, "CNSIM", "CNSIM", counts = TRUE)
# make sure IDs are unique
+cnsim1$id <- paste0(cnsim1$id, "-1")
+cnsim2$id <- paste0(cnsim2$id, "-2")
+cnsim3$id <- paste0(cnsim3$id, "-3")
+# bind tables
+cnsim123 <- rbind(cnsim1, cnsim2, cnsim3)
+# remove some columns
+cnsim123$DIS_AMI <- NULL
+cnsim123$DIS_CVA <- NULL
+cnsim123$DIS_DIAB <- NULL
+# save as a raw table
+opal.table_save(o, cnsim123, "CNSIM", "CNSIM", overwrite = TRUE, force = TRUE)
+opal.table(o, "CNSIM", "CNSIM", counts = TRUE)
Verify that this raw table resulting from the merge of the other tables as same values for a given Participant:
-opal.valueset(o, "CNSIM", "CNSIM", identifier = "1454-1")
opal.valueset(o, "CNSIM", "CNSIM", identifier = "1454-1")
It is possible to truncate a table, i.e. delete ALL the values of a table (which must not be a view), without modifying the dictionary:
-opal.table_truncate(o, "CNSIM", "CNSIM")
-opal.table(o, "CNSIM", "CNSIM", counts = TRUE)
opal.table_truncate(o, "CNSIM", "CNSIM")
+opal.table(o, "CNSIM", "CNSIM", counts = TRUE)
-opal.taxonomies(o)
opal.taxonomies(o)
List the vocabularies of a taxonomy:
-opal.vocabularies(o, taxonomy = "Mlstr_area")
opal.vocabularies(o, taxonomy = "Mlstr_area")
List the terms of a vocabulary:
-opal.terms(o, taxonomy = "Mlstr_area", vocabulary = "Lifestyle_behaviours")
opal.terms(o, taxonomy = "Mlstr_area", vocabulary = "Lifestyle_behaviours")
To apply a taxonomy term to a table dictionary, use the following for batch annotation:
-annotations <- tibble::tribble(
- ~variable, ~taxonomy, ~vocabulary, ~term,
- "LAB_TSC", "Mlstr_area", "Physical_measures", "Physical_characteristics",
- "LAB_TRIG", "Mlstr_area", "Physical_measures", "Physical_characteristics",
- "LAB_HDL", "Mlstr_area", "Physical_measures", "Physical_characteristics",
- "LAB_GLUC_ADJUSTED", "Mlstr_area", "Physical_measures", "Physical_characteristics"
-)
-opal.annotate(o, "CNSIM", "CNSIM123", annotations = annotations)
annotations <- tibble::tribble(
+ ~variable, ~taxonomy, ~vocabulary, ~term,
+ "LAB_TSC", "Mlstr_area", "Physical_measures", "Physical_characteristics",
+ "LAB_TRIG", "Mlstr_area", "Physical_measures", "Physical_characteristics",
+ "LAB_HDL", "Mlstr_area", "Physical_measures", "Physical_characteristics",
+ "LAB_GLUC_ADJUSTED", "Mlstr_area", "Physical_measures", "Physical_characteristics"
+)
+opal.annotate(o, "CNSIM", "CNSIM123", annotations = annotations)
To list the variable annotations:
-opal.annotations(o, "CNSIM", "CNSIM123")
opal.annotations(o, "CNSIM", "CNSIM123")
-opal.resources(o, "RSRC")
opal.resources(o, "RSRC")
To create a reference to a resource (a compressed CSV file, stored in a Opal file system, authorized by a personal access token):
-if (opal.resource_exists(o, "RSRC", "CNSIM4"))
- opal.resource_delete(o, "RSRC", "CNSIM4")
-opal.resource_create(o, "RSRC", "CNSIM4",
- url = "opal+https://opal-demo.obiba.org/ws/files/projects/RSRC/CNSIM3.zip",
- format = "csv", secret = "EeTtQGIob6haio5bx6FUfVvIGkeZJfGq")
-# verify the resource reference object
-opal.resource(o, "RSRC", "CNSIM4")
if (opal.resource_exists(o, "RSRC", "CNSIM4"))
+ opal.resource_delete(o, "RSRC", "CNSIM4")
+opal.resource_create(o, "RSRC", "CNSIM4",
+ url = "opal+https://opal-demo.obiba.org/ws/files/projects/RSRC/CNSIM3.zip",
+ format = "csv", secret = "EeTtQGIob6haio5bx6FUfVvIGkeZJfGq")
+# verify the resource reference object
+opal.resource(o, "RSRC", "CNSIM4")
From a resource reference, it is possible to build and get the resource object in the local R session:
-opal.resource_get(o, "RSRC", "CNSIM4")
opal.resource_get(o, "RSRC", "CNSIM4")
Depending on the nature of the resource, it may be possible to coerce it to a data.frame in the client side:
-library(resourcer)
-as.data.frame(opal.resource_get(o, "RSRC", "CNSIM4"))
library(resourcer)
+as.data.frame(opal.resource_get(o, "RSRC", "CNSIM4"))
The same operation can be done on the R server side:
-# assign the resource object
-opal.assign.resource(o, "rsrc", "RSRC.CNSIM4")
-# coerce it to a data.frame
-opal.assign.script(o, "D", quote(as.data.frame(rsrc)))
-# get some summary statistics
-opal.execute(o, "summary(as.factor(D$GENDER))")
# assign the resource object
+opal.assign.resource(o, "rsrc", "RSRC.CNSIM4")
+# coerce it to a data.frame
+opal.assign.script(o, "D", quote(as.data.frame(rsrc)))
+# get some summary statistics
+opal.execute(o, "summary(as.factor(D$GENDER))")
-opal.logout(o)
opal.logout(o)
Site built with pkgdown 2.0.6.
+Site built with pkgdown 2.0.7.
diff --git a/docs/articles/opal-rsession.html b/docs/articles/opal-rsession.html index 7a892618..17bece90 100644 --- a/docs/articles/opal-rsession.html +++ b/docs/articles/opal-rsession.html @@ -88,7 +88,7 @@vignettes/opal-rsession.Rmd
opal-rsession.Rmd
-library(opalr)
-o <- opal.login("administrator", "password", "https://opal-demo.obiba.org", profile = "default")
library(opalr)
+o <- opal.login("administrator", "password", "https://opal-demo.obiba.org", profile = "default")
Assign a Opal table to a data.frame (if user has permission to see values of the Opal table):
-opal.assign.table(o, symbol = "df", value = "CNSIM.CNSIM1")
opal.assign.table(o, symbol = "df", value = "CNSIM.CNSIM1")
In place of a standard data.frame, Opal can assign data into a tibble:
-opal.assign.table.tibble(o, symbol = "tbl", value = "CNSIM.CNSIM1")
opal.assign.table.tibble(o, symbol = "tbl", value = "CNSIM.CNSIM1")
Resource objects can be assigned to the R server session:
-opal.assign.resource(o, symbol = "rsrc", value = "RSRC.CNSIM3")
opal.assign.resource(o, symbol = "rsrc", value = "RSRC.CNSIM3")
An R expression can also be assigned to a symbol (use
quote()
to not interpret the expression in the client side
R session). As an example assign a function body:
-opal.assign.script(o, symbol = "hello", value = quote(function(x) { paste0("Hello ", x, "!") }))
opal.assign.script(o, symbol = "hello", value = quote(function(x) { paste0("Hello ", x, "!") }))
List the R symbols that lives in the remote R session:
-opal.symbols(o)
opal.symbols(o)
R expressions can be executed on the server side:
-# column names
-opal.execute(o, script = "names(tbl)")
-# get variable description from column attributes
-opal.execute(o, script = "attributes(tbl$GENDER)")
-# coerce resource to a data.frame and plot histogram of one column
-plot(opal.execute(o, script = "hist(as.data.frame(rsrc)$LAB_HDL)"))
-# execute the custom function
-opal.execute(o, script = "hello('friends')")
# column names
+opal.execute(o, script = "names(tbl)")
+# get variable description from column attributes
+opal.execute(o, script = "attributes(tbl$GENDER)")
+# coerce resource to a data.frame and plot histogram of one column
+plot(opal.execute(o, script = "hist(as.data.frame(rsrc)$LAB_HDL)"))
+# execute the custom function
+opal.execute(o, script = "hello('friends')")
The remote data can be downloaded into the client side R session:
-GENDER <- opal.execute(o, script = "tbl$GENDER")
GENDER <- opal.execute(o, script = "tbl$GENDER")
To execute more complex R code, use a local source file:
-opal.execute.source(o, path = "/path/to/some_code.R")
opal.execute.source(o, path = "/path/to/some_code.R")
Files can be written from the Opal file system to the R server session folder:
-opal.file_write(o, source = "/projects/CNSIM/CNSIM3.zip", "test.zip")
opal.file_write(o, source = "/projects/CNSIM/CNSIM3.zip", "test.zip")
Similarly, files can be read from the R server session folder into the Opal file system:
-opal.file_read(o, source = "test.zip", destination = "/tmp")
opal.file_read(o, source = "test.zip", destination = "/tmp")
+opal.workspace_save(o, save="demo")
+opal.workspaces(o)
-opal.logout(o)
opal.logout(o)
Site built with pkgdown 2.0.6.
+Site built with pkgdown 2.0.7.
diff --git a/docs/authors.html b/docs/authors.html index e777bdac..a50c4cbc 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -117,7 +117,7 @@Opal R Client for the Opal data warehouse. Most of the web services of Opal can be reached by an opalr
function: import/export, data dictionaries, projects, tables, resources, permissions, users, DataSHIELD profiles etc.
See opalr documentation.
Installation:
-# install from CRAN
-install.packages("opalr")
-
-# or install latest development version
-remotes::install_github("obiba/opalr")
+# install from CRAN
+install.packages("opalr")
+
+# or install latest development version
+remotes::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 symbol
-opal.assign(o, 'D', 'CNSIM.CNSIM1')
-
-# perform R operations on the server side
-opal.execute(o, 'summary(D$GENDER)')
-opal.execute(o, 'summary(D$LAB_GLUC)')
-
-opal.logout(o)
+library(opalr)
+o <- opal.login('administrator', 'password', url = 'https://opal-demo.obiba.org')
+
+# assign a table (as a data.frame) to a R symbol
+opal.assign(o, 'D', 'CNSIM.CNSIM1')
+
+# perform R operations on the server side
+opal.execute(o, 'summary(D$GENDER)')
+opal.execute(o, 'summary(D$LAB_GLUC)')
+
+opal.logout(o)
-
+
dictionary.annotate.harmo_status(tibble, variables = NULL, status)
dictionary.annotate.harmo_status(tibble, variables = NULL, status)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
-cqx <- dictionary.annotate.harmo_status(cqx,
- variables = c("A_SDC_EDU_LEVEL", "A_SDC_EDU_LEVEL_AGE"),
- status = "complete")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
+cqx <- dictionary.annotate.harmo_status(cqx,
+ variables = c("A_SDC_EDU_LEVEL", "A_SDC_EDU_LEVEL_AGE"),
+ status = "complete")
+opal.logout(o)
+}
dictionary.annotate(
- tibble,
- variables = NULL,
- taxonomy = "Mlstr_area",
- vocabulary,
- term
-)
dictionary.annotate(
+ tibble,
+ variables = NULL,
+ taxonomy = "Mlstr_area",
+ vocabulary,
+ term
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
-cqx <- dictionary.annotate(cqx,
- variables = c("A_SDC_EDU_LEVEL", "A_SDC_EDU_LEVEL_AGE"),
- taxonomy = "Mlstr_area",
- vocabulary = "Sociodemographic_economic_characteristics",
- term = "Education")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
+cqx <- dictionary.annotate(cqx,
+ variables = c("A_SDC_EDU_LEVEL", "A_SDC_EDU_LEVEL_AGE"),
+ taxonomy = "Mlstr_area",
+ vocabulary = "Sociodemographic_economic_characteristics",
+ term = "Education")
+opal.logout(o)
+}
dictionary.annotations(
- tibble,
- variables = NULL,
- taxonomy = NULL,
- vocabulary = NULL
-)
dictionary.annotations(
+ tibble,
+ variables = NULL,
+ taxonomy = NULL,
+ vocabulary = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
-annot <- dictionary.annotations(cqx, taxonomy = "Mlstr_harmo", vocabulary = "status")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
+annot <- dictionary.annotations(cqx, taxonomy = "Mlstr_harmo", vocabulary = "status")
+opal.logout(o)
+}
dictionary.apply(tibble, variables, categories = NULL)
dictionary.apply(tibble, variables, categories = NULL, merge = FALSE)
A data frame with one row per category (columns variable and name) and then column per property/attribute.
Either append attributes to existing ones or replace them. Default is FALSE, for dictionary consistency.
if (FALSE) {
-data <- tibble::as_tibble(mtcars)
-variables <- tibble::tribble(
- ~name, ~valueType, ~`label:en`, ~`Namespace::Name`, ~unit, ~repeatable, ~index,
- "mpg", "decimal", "Mpg label", "Value1", "years", 0, 1,
- "cyl", "decimal", "Cyl label", "Value2", "kg/m2", 0, 2,
- "disp", "decimal", "Disp label", NA, NA, 1, 3
-)
-categories <- tibble::tribble(
- ~variable, ~name, ~missing, ~`label:en`, ~`label:fr`,
- "cyl", "4", 0, "Four", "Quatre",
- "cyl", "6", 0, "Six", "Six",
- "cyl", "8", 1, "Height", "Huit"
-)
-data <- dictionary.apply(data, variables, categories)
-}
+ if (FALSE) {
+data <- tibble::as_tibble(mtcars)
+variables <- tibble::tribble(
+ ~name, ~valueType, ~`label:en`, ~`label:fr`, ~`Namespace::Name`, ~unit, ~repeatable, ~index,
+ "mpg", "decimal", "Mpg label", "Mpg libellé", "Value1", "years", 0, 1,
+ "cyl", "decimal", "Cyl label", "Cyl libellé", "Value2", "kg/m2", 0, 2,
+ "disp", "decimal", "Disp label", "Disp libellé", NA, NA, 1, 3
+)
+categories <- tibble::tribble(
+ ~variable, ~name, ~missing, ~`label:en`, ~`label:fr`,
+ "cyl", "4", 0, "Four", "Quatre",
+ "cyl", "6", 0, "Six", "Six",
+ "cyl", "8", 1, "Height", "Huit"
+)
+data <- dictionary.apply(data, variables, categories)
+}
dictionary.inspect(tibble, id.name = "id", warn = TRUE)
dictionary.inspect(tibble, id.name = "id", warn = TRUE)
if (FALSE) {
-# prepare datasets of visits, several visits for one patient
-visits <- tibble::tribble(
-~id, ~patient_id, ~sex, ~visit_date,
-1, 1, "M", as.Date("2020-01-01"),
-2, 2, "F", as.Date("2020-01-02"),
-3, 3, "M", as.Date("2020-01-03"),
-4, 3, "M", as.Date("2020-01-04"))
-
-o <- opal.login("administrator", "password", url = "https://opal-demo.obiba.org")
-
-# save visits dataset
-opal.table_save(o, visits, "RSRC", "visits", type = "Visit", force = TRUE)
-
-# get visit and make it a dataset of patients
-patients <- opal.table_get(o, "RSRC", "visits", id.name = "id")
-# set dataset IDs
-patients$visit_id <- patients$id
-patients$id <- patients$patient_id
-patients$patient_id <- NULL
-patients
-
-# save patients dataset, there should be a warning that some variables are not repeatable
-# while there are patients with multiple data lines
-opal.table_save(o, patients, "RSRC", "patients", type = "Participant", force = TRUE)
-
-opal.logout(o)
-}
+ if (FALSE) {
+# prepare datasets of visits, several visits for one patient
+visits <- tibble::tribble(
+~id, ~patient_id, ~sex, ~visit_date,
+1, 1, "M", as.Date("2020-01-01"),
+2, 2, "F", as.Date("2020-01-02"),
+3, 3, "M", as.Date("2020-01-03"),
+4, 3, "M", as.Date("2020-01-04"))
+
+o <- opal.login("administrator", "password", url = "https://opal-demo.obiba.org")
+
+# save visits dataset
+opal.table_save(o, visits, "RSRC", "visits", type = "Visit", force = TRUE)
+
+# get visit and make it a dataset of patients
+patients <- opal.table_get(o, "RSRC", "visits", id.name = "id")
+# set dataset IDs
+patients$visit_id <- patients$id
+patients$id <- patients$patient_id
+patients$patient_id <- NULL
+patients
+
+# save patients dataset, there should be a warning that some variables are not repeatable
+# while there are patients with multiple data lines
+opal.table_save(o, patients, "RSRC", "patients", type = "Participant", force = TRUE)
+
+opal.logout(o)
+}
.aclsToDataFrame(perms, acls)
.aclsToDataFrame(perms, acls)
.as.zeroOne(value)
.as.zeroOne(value)
.authorizationHeader(username, password)
.authorizationHeader(username, password)
.deparse(expr)
.deparse(expr)
.extractJsonField(json, fields = NULL, isArray = TRUE)
.extractJsonField(json, fields = NULL, isArray = TRUE)
.extractLabel(
- locale = "en",
- labels = list(),
- localeKey = "locale",
- valueKey = "value"
-)
.extractLabel(
+ locale = "en",
+ labels = list(),
+ localeKey = "locale",
+ valueKey = "value"
+)
.extractOpalSessionId(cookies)
.extractOpalSessionId(cookies)
.getContent(opal, response)
.getContent(opal, response)
.getPEMFilePath(pem, directory = "~/.ssh")
.getPEMFilePath(pem, directory = "~/.ssh")
.getRSessionId(opal)
.getRSessionId(opal)
.getSessions(opal)
.getSessions(opal)
.handleError(opal, response)
.handleError(opal, response)
.handleResponse(opal, response)
.handleResponse(opal, response)
.handleResponseLocation(opal, response)
.handleResponseLocation(opal, response)
.handleResponseOrCallback(opal, response, callback = NULL)
.handleResponseOrCallback(opal, response, callback = NULL)
.is.verbose()
.is.verbose()
.isContentEmpty(content)
.isContentEmpty(content)
.listToJson(l)
.listToJson(l)
.newProgress(
- format = " :what [:bar] :percent /:elapsed",
- clear = getOption("opal.progress.clear", FALSE),
- total,
- width = 100
-)
.newProgress(
+ format = " :what [:bar] :percent /:elapsed",
+ clear = getOption("opal.progress.clear", FALSE),
+ total,
+ width = 100
+)
.newSession(opal, restore = NULL, profile = NULL)
.newSession(opal, restore = NULL, profile = NULL)
.opal.login(
- username,
- password,
- token,
- url,
- opts = list(),
- profile = profile,
- restore = NULL
-)
.opal.login(
+ username,
+ password,
+ token,
+ url,
+ opts = list(),
+ profile = profile,
+ restore = NULL
+)
.rmOpalSession(opal)
.rmOpalSession(opal)
.rmRSession(opal, save = FALSE)
.rmRSession(opal, save = FALSE)
.select(l, field)
.select(l, field)
.tokenHeader(token)
.tokenHeader(token)
.url(opal, ...)
.url(opal, ...)
.verbose()
.verbose()
Get the recorded DataSHIELD session metrics.
+dsadmin.activity(
+ opal,
+ user = NULL,
+ profile = NULL,
+ from = NULL,
+ to = NULL,
+ df = TRUE
+)
Opal connection object.
Optional user name.
Optional profile name.
Optional start date.
Optional end date.
Return a data.frame (default is TRUE)
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# all sessions metrics
+dsadmin.activity(o)
+# user and profile specific session metrics
+dsadmin.activity(o, user = 'dsuser', profile = 'default')
+# user sessions in a time range
+dsadmin.activity(o, user = "dsuser", from = "2022-07-01", to = "2023-01-01")
+opal.logout(o)
+}
+
Get the recorded DataSHIELD session metrics, grouped by profile and user.
+dsadmin.activity_summary(
+ opal,
+ user = NULL,
+ profile = NULL,
+ from = NULL,
+ to = NULL,
+ df = TRUE
+)
Opal connection object.
Optional user name.
Optional profile name.
Optional start date.
Optional end date.
Return a data.frame (default is TRUE)
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# all sessions metrics
+dsadmin.activity_summary(o)
+# user and profile specific session metrics
+dsadmin.activity_summary(o, user = 'dsuser', profile = 'default')
+# user sessions in a time range
+dsadmin.activity_summary(o, user = "dsuser", from = "2022-07-01", to = "2023-01-01")
+opal.logout(o)
+}
+
dsadmin.get_method(opal, name, type = "aggregate", profile = NULL)
dsadmin.get_method(opal, name, type = "aggregate", profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.get_method(o, 'class')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.get_method(o, 'class')
+opal.logout(o)
+}
dsadmin.get_methods(opal, type = "aggregate", profile = NULL)
dsadmin.get_methods(opal, type = "aggregate", profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.get_methods(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.get_methods(o)
+opal.logout(o)
+}
dsadmin.get_options(opal, profile = NULL)
dsadmin.get_options(opal, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.get_options(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.get_options(o)
+opal.logout(o)
+}
dsadmin.install_github_package(
- opal,
- pkg,
- username = "datashield",
- ref = "master",
- profile = NULL
-)
dsadmin.install_github_package(
+ opal,
+ pkg,
+ username = "datashield",
+ ref = "master",
+ profile = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.install_github_package(o, 'dsOmics', username='isglobal-brge')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.install_github_package(o, 'dsOmics', username='isglobal-brge')
+opal.logout(o)
+}
dsadmin.install_local_package(opal, path, profile = NULL)
dsadmin.install_local_package(opal, path, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# install a pre-built local archive file
-dsadmin.install_local_package(o, '~/dsExposome_1.0.0.tar.gz')
-# or build archive file from local package source (in current working folder)
-dsadmin.install_local_package(o, devtools::build())
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# install a pre-built local archive file
+dsadmin.install_local_package(o, '~/dsExposome_1.0.0.tar.gz')
+# or build archive file from local package source (in current working folder)
+dsadmin.install_local_package(o, devtools::build())
+opal.logout(o)
+}
dsadmin.install_package(
- opal,
- pkg,
- githubusername = NULL,
- ref = NULL,
- profile = NULL
-)
dsadmin.install_package(
+ opal,
+ pkg,
+ githubusername = NULL,
+ ref = NULL,
+ profile = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.install_package(o, 'dsBase')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.install_package(o, 'dsBase')
+opal.logout(o)
+}
dsadmin.installed_package(opal, pkg, profile = NULL)
dsadmin.installed_package(opal, pkg, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.installed_package(o, 'dsBase')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.installed_package(o, 'dsBase')
+opal.logout(o)
+}
The DataSHIELD log is structured as follows:
+dsadmin.log(opal, all = TRUE)
Opal connection object.
Get all or only latest log messages.
Common fields
timestamp: when action is logged
version: not used
message: human readable message
logger_name: name of the log channel
thread_name: java thread name
level: log level (TRACE, DEBUG, INFO, WARN, ERROR)
level_value: log level numeric value
ip: ip origin of the request, when available
ds_id: unique DS session ID
ds_profile: DS profile name (available after the R server session is created, can be after authentication)
username: DS user name
r_duration: time spent by the remote R server action (all except PARSE)
r_size: R result serialized object size in bytes
ds_action: DS operation (OPEN, CLOSE, PARSE, ASSIGN, AGGREGATE, LS, RM, WS_SAVE, WS_RESTORE)
DS operations fields
OPEN: DS session opened (note: happens after successful authentication as R server session creation is deferred)
CLOSE: DS session closed
PARSE: R expression parsed
ds_map: DS function mappings used in the R parser, separated by semicolons when several functions are called
ds_script_in: R script as sent by DS user
ds_script_out: R script rewritten by opal, to be evaluated
ASSIGN:
ds_symbol: assigned symbol name
ds_table: table name that is assigned
ds_resource: resource name that is assigned
ds_eval: assign R expression that is evaluated
AGGREGATE:
ds_eval: aggregate R expression that is evaluated
LS: R symbols listed
RM: R symbol removed
ds_symbol: symbol name to remove
WS_SAVE:
ds_ws: workspace name
WS_RESTORE:
ds_ws: workspace name
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.log(o)
+opal.logout(o)
+}
+
dsadmin.package_description(opal, pkg, fields = NULL, profile = NULL)
dsadmin.package_description(opal, pkg, fields = NULL, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.package_description(o, 'dsBase')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.package_description(o, 'dsBase')
+opal.logout(o)
+}
dsadmin.package_descriptions(opal, fields = NULL, df = TRUE, profile = NULL)
dsadmin.package_descriptions(opal, fields = NULL, df = TRUE, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.package_descriptions(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.package_descriptions(o)
+opal.logout(o)
+}
dsadmin.perm(opal)
dsadmin.perm(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-dsadmin.perm(o)
-dsadmin.perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+dsadmin.perm(o)
+dsadmin.perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
dsadmin.perm_add(opal, subject, type = "user", permission)
dsadmin.perm_add(opal, subject, type = "user", permission)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-dsadmin.perm(o)
-dsadmin.perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+dsadmin.perm(o)
+dsadmin.perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
dsadmin.perm_delete(opal, subject, type = "user")
dsadmin.perm_delete(opal, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-dsadmin.perm(o)
-dsadmin.perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+dsadmin.perm(o)
+dsadmin.perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
dsadmin.profile(opal, name)
dsadmin.profile(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile(o, name = 'default')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile(o, name = 'default')
+opal.logout(o)
+}
dsadmin.profile_access(opal, name, restricted = TRUE)
dsadmin.profile_access(opal, name, restricted = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
-dsadmin.profile_access(o, name = 'survival', restricted = TRUE)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
+dsadmin.profile_access(o, name = 'survival', restricted = TRUE)
+opal.logout(o)
+}
dsadmin.profile_create(opal, name, cluster = "default", rParser = NULL)
dsadmin.profile_create(opal, name, cluster = "default", rParser = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
+opal.logout(o)
+}
dsadmin.profile_delete(opal, name)
dsadmin.profile_delete(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
-dsadmin.profile_delete(o, name = 'survival')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
+dsadmin.profile_delete(o, name = 'survival')
+opal.logout(o)
+}
dsadmin.profile_enable(opal, name, enabled = TRUE)
dsadmin.profile_enable(opal, name, enabled = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
-dsadmin.profile_enable(o, name = 'survival', enabled = TRUE)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
+dsadmin.profile_enable(o, name = 'survival', enabled = TRUE)
+opal.logout(o)
+}
dsadmin.profile_exists(opal, name)
dsadmin.profile_exists(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-if (!dsadmin.profile_exists(o, name = 'survival'))
- dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+if (!dsadmin.profile_exists(o, name = 'survival'))
+ dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
+opal.logout(o)
+}
dsadmin.profile_init(opal, name, packages = NULL)
dsadmin.profile_init(opal, name, packages = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
-dsadmin.profile_init(o, name = 'survival', packages = c('dsSurvival'))
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
+dsadmin.profile_init(o, name = 'survival', packages = c('dsSurvival'))
+opal.logout(o)
+}
dsadmin.profile_perm(opal, name)
dsadmin.profile_perm(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_perm_add(o, 'default', c('andrei', 'valentina'), 'user', 'use')
-dsadmin.profile_perm(o, 'default')
-dsadmin.profile_perm_delete(o, 'default', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_perm_add(o, 'default', c('andrei', 'valentina'), 'user', 'use')
+dsadmin.profile_perm(o, 'default')
+dsadmin.profile_perm_delete(o, 'default', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
dsadmin.profile_perm_add(
- opal,
- name,
- subject,
- type = "user",
- permission = "use"
-)
dsadmin.profile_perm_add(
+ opal,
+ name,
+ subject,
+ type = "user",
+ permission = "use"
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_perm_add(o, 'default', c('andrei', 'valentina'), 'user', 'use')
-dsadmin.profile_perm(o, 'default')
-dsadmin.profile_perm_delete(o, 'default', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_perm_add(o, 'default', c('andrei', 'valentina'), 'user', 'use')
+dsadmin.profile_perm(o, 'default')
+dsadmin.profile_perm_delete(o, 'default', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
dsadmin.profile_perm_delete(opal, name, subject, type = "user")
dsadmin.profile_perm_delete(opal, name, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_perm_add(o, 'default', c('andrei', 'valentina'), 'user', 'use')
-dsadmin.profile_perm(o, 'default')
-dsadmin.profile_perm_delete(o, 'default', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_perm_add(o, 'default', c('andrei', 'valentina'), 'user', 'use')
+dsadmin.profile_perm(o, 'default')
+dsadmin.profile_perm_delete(o, 'default', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
dsadmin.profile_rparser(opal, name, rParser = NULL)
dsadmin.profile_rparser(opal, name, rParser = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
-# apply R parser version v2
-dsadmin.profile_rparser(o, name = 'survival', rParser = 'v2')
-# apply system's default R parser version
-dsadmin.profile_rparser(o, name = 'survival')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.profile_create(o, name = 'survival', cluster = 'demo')
+# apply R parser version v2
+dsadmin.profile_rparser(o, name = 'survival', rParser = 'v2')
+# apply system's default R parser version
+dsadmin.profile_rparser(o, name = 'survival')
+opal.logout(o)
+}
dsadmin.profiles(opal, df = TRUE)
dsadmin.profiles(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.package_descriptions(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.package_descriptions(o)
+opal.logout(o)
+}
dsadmin.publish_package(opal, pkg, profile = NULL)
dsadmin.publish_package(opal, pkg, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.publish_package(o, 'dsBase')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.publish_package(o, 'dsBase')
+opal.logout(o)
+}
dsadmin.remove_package(opal, pkg, profile = NULL)
dsadmin.remove_package(opal, pkg, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.remove_package(o, 'dsBase')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.remove_package(o, 'dsBase')
+opal.logout(o)
+}
dsadmin.rm_method(opal, name, type = "aggregate", profile = NULL)
dsadmin.rm_method(opal, name, type = "aggregate", profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.rm_method(o, 'foo')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.rm_method(o, 'foo')
+opal.logout(o)
+}
dsadmin.rm_methods(opal, type = NULL, profile = NULL)
dsadmin.rm_methods(opal, type = NULL, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.rm_methods(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.rm_methods(o)
+opal.logout(o)
+}
dsadmin.rm_option(opal, name, profile = NULL)
dsadmin.rm_option(opal, name, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.rm_option(o, 'foo')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.rm_option(o, 'foo')
+opal.logout(o)
+}
dsadmin.rm_options(opal, profile = NULL)
dsadmin.rm_options(opal, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.rm_options(o, 'foo')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.rm_options(o, 'foo')
+opal.logout(o)
+}
dsadmin.rm_package_methods(opal, pkg, type = NULL, profile = NULL)
dsadmin.rm_package_methods(opal, pkg, type = NULL, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.rm_package_methods(o, 'dsBase')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.rm_package_methods(o, 'dsBase')
+opal.logout(o)
+}
dsadmin.set_method(
- opal,
- name,
- func = NULL,
- path = NULL,
- type = "aggregate",
- profile = NULL
-)
dsadmin.set_method(
+ opal,
+ name,
+ func = NULL,
+ path = NULL,
+ type = "aggregate",
+ profile = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# as a package's function
-dsadmin.set_method(o, 'foo', func = 'base::mean')
-# as a custom function
-dsadmin.set_method(o, 'foo', func = function(x) { base::mean(x) })
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# as a package's function
+dsadmin.set_method(o, 'foo', func = 'base::mean')
+# as a custom function
+dsadmin.set_method(o, 'foo', func = function(x) { base::mean(x) })
+opal.logout(o)
+}
dsadmin.set_option(opal, name, value, profile = NULL)
dsadmin.set_option(opal, name, value, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.set_option(o, 'foo', 'bar')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.set_option(o, 'foo', 'bar')
+opal.logout(o)
+}
dsadmin.set_package_methods(opal, pkg, type = NULL, profile = NULL)
dsadmin.set_package_methods(opal, pkg, type = NULL, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.set_package_methods(o, 'dsBase')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.set_package_methods(o, 'dsBase')
+opal.logout(o)
+}
dsadmin.unpublish_package(opal, pkg, profile = NULL)
dsadmin.unpublish_package(opal, pkg, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dsadmin.unpublish_package(o, 'dsBase')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dsadmin.unpublish_package(o, 'dsBase')
+opal.logout(o)
+}
dictionary.inspect()
Inspect the dictionary of a tibble
Get DataSHIELD activity
Get DataSHIELD activity summary
dsadmin.installed_package()
Check DataSHIELD package
Get DataSHIELD logs
dsadmin.unpublish_package()
Unpublish DataSHIELD package settings
Get R activity
Get R activity summary
oadmin.installed_packages()
List installed packages
Get Opal main logs
Get Opal REST API logs
Get Opal SQL API logs
opal.logout()
Logout from Opal(s)
Get the permissions of a subject
Get the recorded R session metrics.
+oadmin.activity(
+ opal,
+ user = NULL,
+ profile = NULL,
+ from = NULL,
+ to = NULL,
+ df = TRUE
+)
Opal connection object.
Optional user name.
Optional profile name.
Optional start date.
Optional end date.
Return a data.frame (default is TRUE)
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# all sessions metrics
+oadmin.activity(o)
+# user and profile specific session metrics
+oadmin.activity(o, user = 'dsuser', profile = 'default')
+# user sessions in a time range
+oadmin.activity(o, user = "dsuser", from = "2022-07-01", to = "2023-01-01")
+opal.logout(o)
+}
+
Get the recorded R session metrics, grouped by profile and user.
+oadmin.activity_summary(
+ opal,
+ user = NULL,
+ profile = NULL,
+ from = NULL,
+ to = NULL,
+ df = TRUE
+)
Opal connection object.
Optional user name.
Optional profile name.
Optional start date.
Optional end date.
Return a data.frame (default is TRUE)
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# all sessions metrics
+oadmin.activity_summary(o)
+# user and profile specific session metrics
+oadmin.activity_summary(o, user = 'dsuser', profile = 'default')
+# user sessions in a time range
+oadmin.activity_summary(o, user = "dsuser", from = "2022-07-01", to = "2023-01-01")
+opal.logout(o)
+}
+
oadmin.install_bioconductor_package(opal, pkg, profile = NULL)
oadmin.install_bioconductor_package(opal, pkg, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.install_bioconductor_package(o, 'GWASTools')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.install_bioconductor_package(o, 'GWASTools')
+opal.logout(o)
+}
oadmin.install_cran_package(opal, pkg, profile = NULL)
oadmin.install_cran_package(opal, pkg, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.install_cran_package(o, 'opalr', 'obiba')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.install_cran_package(o, 'opalr', 'obiba')
+opal.logout(o)
+}
oadmin.install_devtools(opal, profile = NULL)
oadmin.install_devtools(opal, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.install_devtools(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.install_devtools(o)
+opal.logout(o)
+}
oadmin.install_github_package(
- opal,
- pkg,
- username = getOption("github.user"),
- ref = "master",
- profile = NULL
-)
oadmin.install_github_package(
+ opal,
+ pkg,
+ username = getOption("github.user"),
+ ref = "master",
+ profile = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.install_github_package(o, 'opalr', 'obiba')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.install_github_package(o, 'opalr', 'obiba')
+opal.logout(o)
+}
oadmin.install_local_package(opal, path, profile = NULL)
oadmin.install_local_package(opal, path, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# install a pre-built local archive file
-oadmin.install_local_package(o, '~/Rserve_1.8-7.tar.gz')
-# or build archive file from local package source (in current working folder)
-oadmin.install_local_package(o, devtools::build())
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# install a pre-built local archive file
+oadmin.install_local_package(o, '~/Rserve_1.8-7.tar.gz')
+# or build archive file from local package source (in current working folder)
+oadmin.install_local_package(o, devtools::build())
+opal.logout(o)
+}
oadmin.install_package(opal, pkg, repos = NULL, profile = NULL)
oadmin.install_package(opal, pkg, repos = NULL, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.install_package(o, 'xxx')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.install_package(o, 'xxx')
+opal.logout(o)
+}
oadmin.installed_devtools(opal, profile = NULL)
oadmin.installed_devtools(opal, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.installed_devtools(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.installed_devtools(o)
+opal.logout(o)
+}
oadmin.installed_package(opal, pkg, profile = NULL)
oadmin.installed_package(opal, pkg, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.installed_package(o, 'xxx')
-oadmin.installed_package(o, 'stats')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.installed_package(o, 'xxx')
+oadmin.installed_package(o, 'stats')
+opal.logout(o)
+}
oadmin.installed_packages(opal, profile = NULL)
oadmin.installed_packages(opal, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.installed_packages(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.installed_packages(o)
+opal.logout(o)
+}
Get Opal main logs
+oadmin.log(opal, all = TRUE)
Opal connection object.
Get all or only latest log messages.
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.log(o)
+opal.logout(o)
+}
+
Get Opal REST API logs
+oadmin.log_rest(opal, all = TRUE)
Opal connection object.
Get all or only latest log messages.
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.log_rest(o)
+opal.logout(o)
+}
+
Get Opal SQL API logs
+oadmin.log_sql(opal, all = TRUE)
Opal connection object.
Get all or only latest log messages.
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.log_sql(o)
+opal.logout(o)
+}
+
oadmin.package_description(opal, pkg, fields = NULL, profile = NULL)
oadmin.package_description(opal, pkg, fields = NULL, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.package_description(o, 'stats')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.package_description(o, 'stats')
+opal.logout(o)
+}
oadmin.perm(opal)
oadmin.perm(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-oadmin.r_perm(o)
-oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+oadmin.r_perm(o)
+oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.perm_add(opal, subject, type = "user", permission)
oadmin.perm_add(opal, subject, type = "user", permission)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-oadmin.r_perm(o)
-oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+oadmin.r_perm(o)
+oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.perm_delete(opal, subject, type = "user")
oadmin.perm_delete(opal, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-oadmin.r_perm(o)
-oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+oadmin.r_perm(o)
+oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.r_perm(opal)
oadmin.r_perm(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-oadmin.r_perm(o)
-oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+oadmin.r_perm(o)
+oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.r_perm_add(opal, subject, type = "user", permission = "use")
oadmin.r_perm_add(opal, subject, type = "user", permission = "use")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-oadmin.r_perm(o)
-oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+oadmin.r_perm(o)
+oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.r_perm_delete(opal, subject, type = "user")
oadmin.r_perm_delete(opal, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
-oadmin.r_perm(o)
-oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.r_perm_add(o, c('andrei', 'valentina'), 'user', 'use')
+oadmin.r_perm(o)
+oadmin.r_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.remove_package(opal, pkg, profile = NULL)
oadmin.remove_package(opal, pkg, profile = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.remove_package(o, 'xxx')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.remove_package(o, 'xxx')
+opal.logout(o)
+}
oadmin.system_metrics(opal)
oadmin.system_metrics(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.system_metrics(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.system_metrics(o)
+opal.logout(o)
+}
oadmin.system_perm(opal)
oadmin.system_perm(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.system_perm_add(o, c('andrei', 'valentina'), 'user', 'project_add')
-oadmin.system_perm(o)
-oadmin.system_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.system_perm_add(o, c('andrei', 'valentina'), 'user', 'project_add')
+oadmin.system_perm(o)
+oadmin.system_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.system_perm_add(opal, subject, type = "user", permission)
oadmin.system_perm_add(opal, subject, type = "user", permission)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.system_perm_add(o, c('andrei', 'valentina'), 'user', 'project_add')
-oadmin.system_perm(o)
-oadmin.system_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.system_perm_add(o, c('andrei', 'valentina'), 'user', 'project_add')
+oadmin.system_perm(o)
+oadmin.system_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.system_perm_delete(opal, subject, type = "user")
oadmin.system_perm_delete(opal, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.system_perm_add(o, c('andrei', 'valentina'), 'user', 'project_add')
-oadmin.system_perm(o)
-oadmin.system_perm_delete(o, c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.system_perm_add(o, c('andrei', 'valentina'), 'user', 'project_add')
+oadmin.system_perm(o)
+oadmin.system_perm_delete(o, c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
oadmin.user_add(opal, name, groups = NULL, password = NULL)
oadmin.user_add(opal, name, groups = NULL, password = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
+opal.logout(o)
+}
oadmin.user_delete(opal, name)
oadmin.user_delete(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
-oadmin.user_delete(o, "foo")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
+oadmin.user_delete(o, "foo")
+opal.logout(o)
+}
oadmin.user_enable(opal, name, enabled = TRUE)
oadmin.user_enable(opal, name, enabled = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
-oadmin.user_enable(o, "foo", enabled = FALSE)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
+oadmin.user_enable(o, "foo", enabled = FALSE)
+opal.logout(o)
+}
oadmin.user_exists(opal, name)
oadmin.user_exists(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-if (!oadmin.user_exists(o, "foo"))
- oadmin.user_add(o, "foo", password = "bar123")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+if (!oadmin.user_exists(o, "foo"))
+ oadmin.user_add(o, "foo", password = "bar123")
+opal.logout(o)
+}
oadmin.user_profile_delete(opal, name)
oadmin.user_profile_delete(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
-oadmin.user_profile_delete(o, "foo")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
+oadmin.user_profile_delete(o, "foo")
+opal.logout(o)
+}
oadmin.user_profiles(opal, df = TRUE)
oadmin.user_profiles(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.user_profiles(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.user_profiles(o)
+opal.logout(o)
+}
oadmin.user_reset_password(opal, name, password = NULL)
oadmin.user_reset_password(opal, name, password = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
-oadmin.user_reset_password(o, "foo", password = "password1234")
-oadmin.user_rm(o, "foo")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+pwd <- oadmin.user_add(o, "foo", groups = c("datashield", "CNSIM"))
+oadmin.user_reset_password(o, "foo", password = "password1234")
+oadmin.user_rm(o, "foo")
+opal.logout(o)
+}
oadmin.users(opal, df = TRUE)
oadmin.users(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-oadmin.users(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+oadmin.users(o)
+opal.logout(o)
+}
opal.annotate(opal, datasource, table, annotations)
opal.annotate(opal, datasource, table, annotations)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-annots <- opal.annotations(o, 'CPTP', 'Coreqx_final')
-opal.annotate(o, 'CPTP', 'Cag_coreqx', annots)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+annots <- opal.annotations(o, 'CPTP', 'Coreqx_final')
+opal.annotate(o, 'CPTP', 'Cag_coreqx', annots)
+opal.logout(o)
+}
opal.annotations(opal, datasource, table)
opal.annotations(opal, datasource, table)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.annotations(o, 'CPTP', 'Coreqx_final')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.annotations(o, 'CPTP', 'Coreqx_final')
+opal.logout(o)
+}
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.as_md_table(opal.variables(o, 'datashield', 'CNSIM1'))
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.as_md_table(opal.variables(o, 'datashield', 'CNSIM1'))
+opal.logout(o)
+}
opal.assign.data(opal, symbol, value, async = FALSE)
opal.assign.data(opal, symbol, value, async = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# push an arbitrary data frame to the R server
-opal.assign.data(o, "D", mtcars)
-# push an arbitrary vector to the R server
-opal.assign.data(o, "C", mtcars$cyl)
-# push a string
-opal.assign.data(o, "S", "Hello!")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# push an arbitrary data frame to the R server
+opal.assign.data(o, "D", mtcars)
+# push an arbitrary vector to the R server
+opal.assign.data(o, "C", mtcars$cyl)
+# push a string
+opal.assign.data(o, "S", "Hello!")
+opal.logout(o)
+}
opal.assign(
- opal,
- symbol,
- value,
- variables = NULL,
- missings = FALSE,
- identifiers = NULL,
- id.name = NULL,
- updated.name = NULL,
- async = FALSE
-)
opal.assign(
+ opal,
+ symbol,
+ value,
+ variables = NULL,
+ missings = FALSE,
+ identifiers = NULL,
+ id.name = NULL,
+ updated.name = NULL,
+ async = FALSE
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# assign a list of variables from table CNSIM1
-opal.assign(o, symbol="D", value="datashield.CNSIM1", variables=list("GENDER","LAB_TSC"))
-# assign all the variables matching 'LAB' from table HOP of opal object o
-opal.assign(o, symbol="D", value="datashield.CNSIM1", variables="name().matches('LAB_')")
-# assign a function and call it
-opal.assign.script(o, 'hello', quote(function(x) { print(paste0('Hello ', x , '!'))}))
-opal.execute(o, "hello('Mr Bean')")
-# push an arbitrary data frame to the R server
-#opal.assign(o, "D", mtcars)
-# push an arbitrary vector to the R server
-#opal.assign(o, "C", mtcars$cyl)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# assign a list of variables from table CNSIM1
+opal.assign(o, symbol="D", value="datashield.CNSIM1", variables=list("GENDER","LAB_TSC"))
+# assign all the variables matching 'LAB' from table HOP of opal object o
+opal.assign(o, symbol="D", value="datashield.CNSIM1", variables="name().matches('LAB_')")
+# assign a function and call it
+opal.assign.script(o, 'hello', quote(function(x) { print(paste0('Hello ', x , '!'))}))
+opal.execute(o, "hello('Mr Bean')")
+# push an arbitrary data frame to the R server
+#opal.assign(o, "D", mtcars)
+# push an arbitrary vector to the R server
+#opal.assign(o, "C", mtcars$cyl)
+opal.logout(o)
+}
opal.assign.resource(opal, symbol, value, async = FALSE)
opal.assign.resource(opal, symbol, value, async = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# assign a resource and make some operation on it
-opal.assign.resource(o, "D", "datashield.cram1")
-opal.execute(o, "class(D)")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# assign a resource and make some operation on it
+opal.assign.resource(o, "D", "datashield.cram1")
+opal.execute(o, "class(D)")
+opal.logout(o)
+}
opal.assign.script(opal, symbol, value, async = FALSE)
opal.assign.script(opal, symbol, value, async = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# assign a function and call it
-opal.assign.script(o, 'hello', quote(function(x) { print(paste0('Hello ', x , '!'))}))
-opal.execute(o, "hello('Mr Bean')")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# assign a function and call it
+opal.assign.script(o, 'hello', quote(function(x) { print(paste0('Hello ', x , '!'))}))
+opal.execute(o, "hello('Mr Bean')")
+opal.logout(o)
+}
opal.assign.table(
- opal,
- symbol,
- value,
- variables = NULL,
- missings = FALSE,
- identifiers = NULL,
- id.name = NULL,
- updated.name = NULL,
- class = "data.frame",
- async = FALSE
-)
opal.assign.table(
+ opal,
+ symbol,
+ value,
+ variables = NULL,
+ missings = FALSE,
+ identifiers = NULL,
+ id.name = NULL,
+ updated.name = NULL,
+ class = "data.frame",
+ async = FALSE
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# assign a list of variables from table CNSIM1
-opal.assign.table(o, symbol="D", value="datashield.CNSIM1", variables=list("GENDER","LAB_TSC"))
-opal.execute(o, "colnames(D)")
-# assign a table CNSIM1 with a identifiers column
-opal.assign.table(o, symbol="H", value="datashield.CNSIM1", id.name="id")
-opal.execute(o, "colnames(H)")
-# assign all the variables matching 'LAB' from table HOP of opal object o
-opal.assign.table(o, symbol="D", value="datashield.CNSIM1", variables="name().matches('LAB_')")
-opal.execute(o, "colnames(D)")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# assign a list of variables from table CNSIM1
+opal.assign.table(o, symbol="D", value="datashield.CNSIM1", variables=list("GENDER","LAB_TSC"))
+opal.execute(o, "colnames(D)")
+# assign a table CNSIM1 with a identifiers column
+opal.assign.table(o, symbol="H", value="datashield.CNSIM1", id.name="id")
+opal.execute(o, "colnames(H)")
+# assign all the variables matching 'LAB' from table HOP of opal object o
+opal.assign.table(o, symbol="D", value="datashield.CNSIM1", variables="name().matches('LAB_')")
+opal.execute(o, "colnames(D)")
+opal.logout(o)
+}
opal.assign.table.tibble(
- opal,
- symbol,
- value,
- variables = NULL,
- missings = FALSE,
- identifiers = NULL,
- id.name = "id",
- with.factors = FALSE,
- updated.name = NULL,
- async = FALSE
-)
opal.assign.table.tibble(
+ opal,
+ symbol,
+ value,
+ variables = NULL,
+ missings = FALSE,
+ identifiers = NULL,
+ id.name = "id",
+ with.factors = FALSE,
+ updated.name = NULL,
+ async = FALSE
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# assign a table and make some operation on it
-opal.assign.table.tibble(o, 'D', 'datashield.CNSIM1')
-opal.execute(o, "class(D)")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# assign a table and make some operation on it
+opal.assign.table.tibble(o, 'D', 'datashield.CNSIM1')
+opal.execute(o, "class(D)")
+opal.logout(o)
+}
opal.attribute_values(attributes, namespace = NULL, name = "label")
opal.attribute_values(attributes, namespace = NULL, name = "label")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-var <- opal.variable(o, 'CNSIM', 'CNSIM1', 'GENDER')
-opal.attribute_values(var$attributes)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+var <- opal.variable(o, 'CNSIM', 'CNSIM1', 'GENDER')
+opal.attribute_values(var$attributes)
+opal.logout(o)
+}
opal.command(opal, id, wait = FALSE)
opal.command(opal, id, wait = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.command(o, '1234')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.command(o, '1234')
+opal.logout(o)
+}
opal.command_result(opal, id, wait = FALSE)
opal.command_result(opal, id, wait = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.command_result(o, '1234')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.command_result(o, '1234')
+opal.logout(o)
+}
opal.command_rm(opal, id)
opal.command_rm(opal, id)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.command_rm(o, '1234')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.command_rm(o, '1234')
+opal.logout(o)
+}
opal.commands(opal, df = TRUE)
opal.commands(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.commands(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.commands(o)
+opal.logout(o)
+}
opal.commands_rm(opal)
opal.commands_rm(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.commands_rm(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.commands_rm(o)
+opal.logout(o)
+}
opal.datasource(opal, datasource)
opal.datasource(opal, datasource)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.datasource(o, 'CNSIM')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.datasource(o, 'CNSIM')
+opal.logout(o)
+}
opal.datasources(opal, df = TRUE)
opal.datasources(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.datasources(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.datasources(o)
+opal.logout(o)
+}
opal.delete(opal, ..., query = list(), callback = NULL)
opal.delete(opal, ..., query = list(), callback = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
-opal.delete(o, 'some', 'resource')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
+opal.delete(o, 'some', 'resource')
+opal.logout(o)
+}
opal.execute(opal, script, async = FALSE)
opal.execute(opal, script, async = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.execute(o, "x <- 'foo'")
-opal.execute(o, "ls()")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.execute(o, "x <- 'foo'")
+opal.execute(o, "ls()")
+opal.logout(o)
+}
opal.execute.source(opal, path, async = FALSE)
opal.execute.source(opal, path, async = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.execute.source(o, "myscript.R")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.execute.source(o, "myscript.R")
+opal.logout(o)
+}
opal.file(opal, path, key = NULL)
opal.file(opal, path, key = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.file(o, '/home/administrator/joins/join-src-3.csv')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.file(o, '/home/administrator/joins/join-src-3.csv')
+opal.logout(o)
+}
opal.file_cp(opal, source, destination)
opal.file_cp(opal, source, destination)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# copy a file to another folder
-opal.file_cp(o, '/home/administrator/export/some-data.csv', '/home/userx/deliverables')
-# copy recursively a folder to another folder
-opal.file_cp(o, '/home/administrator/export', '/home/userx/deliverables')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# copy a file to another folder
+opal.file_cp(o, '/home/administrator/export/some-data.csv', '/home/userx/deliverables')
+# copy recursively a folder to another folder
+opal.file_cp(o, '/home/administrator/export', '/home/userx/deliverables')
+opal.logout(o)
+}
opal.file_download(opal, source, destination = NULL, key = NULL)
opal.file_download(opal, source, destination = NULL, key = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# download a file
-opal.file_download(o, '/home/administrator/joins/join-src-3.csv')
-# download a file encrypted by a key: resulting file is a zip with an encrypted content
-opal.file_download(o, '/home/administrator/export/some-data.csv',
- destination='some-data.zip', key='AZF57893FBDE')
-# download, create destination folder and rename file
-opal.file_download(o, '/home/administrator/spss/DatabaseTest.sav', 'spss/test.sav')
-# download a folder
-opal.file_download(o, '/home/administrator/export', 'export.zip')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# download a file
+opal.file_download(o, '/home/administrator/joins/join-src-3.csv')
+# download a file encrypted by a key: resulting file is a zip with an encrypted content
+opal.file_download(o, '/home/administrator/export/some-data.csv',
+ destination='some-data.zip', key='AZF57893FBDE')
+# download, create destination folder and rename file
+opal.file_download(o, '/home/administrator/spss/DatabaseTest.sav', 'spss/test.sav')
+# download a folder
+opal.file_download(o, '/home/administrator/export', 'export.zip')
+opal.logout(o)
+}
opal.file_ls(opal, path)
opal.file_ls(opal, path)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# list content of a folder
-opal.file_ls(o, '/home/administrator')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# list content of a folder
+opal.file_ls(o, '/home/administrator')
+opal.logout(o)
+}
opal.file_mkdir(opal, path, parents = FALSE)
opal.file_mkdir(opal, path, parents = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# make a folder
-opal.file_mkdir(o, '/home/administrator/test', parents = TRUE)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# make a folder
+opal.file_mkdir(o, '/home/administrator/test', parents = TRUE)
+opal.logout(o)
+}
opal.file_mkdir_tmp(opal)
opal.file_mkdir_tmp(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# make a folder
-path <- opal.file_mkdir_tmp(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# make a folder
+path <- opal.file_mkdir_tmp(o)
+opal.logout(o)
+}
opal.file_mv(opal, source, destination)
opal.file_mv(opal, source, destination)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# move a file to another folder
-opal.file_mv(o, '/home/administrator/export/some-data.csv', '/home/userx/deliverables')
-# rename a file
-opal.file_mv(o, '/home/administrator/export/some-data-20170123.csv',
- '/home/administrator/export/some-data.csv')
-# move and rename a file
-opal.file_mv(o, '/home/administrator/export/some-data-20170123.csv',
- '/home/userx/deliverables/some-data.csv')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# move a file to another folder
+opal.file_mv(o, '/home/administrator/export/some-data.csv', '/home/userx/deliverables')
+# rename a file
+opal.file_mv(o, '/home/administrator/export/some-data-20170123.csv',
+ '/home/administrator/export/some-data.csv')
+# move and rename a file
+opal.file_mv(o, '/home/administrator/export/some-data-20170123.csv',
+ '/home/userx/deliverables/some-data.csv')
+opal.logout(o)
+}
opal.file_read(opal, source, destination)
opal.file_read(opal, source, destination)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# read into folder
-opal.file_read(o,"DatabaseTest.sav", "/tmp")
-# read and rename
-opal.file_read(o,"test/DatabaseTest.sav", "/tmp/Test.sav")
-# user home expansion
-opal.file_read(o,"DatabaseTest.sav", "~/coucou/pwel.sav")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# read into folder
+opal.file_read(o,"DatabaseTest.sav", "/tmp")
+# read and rename
+opal.file_read(o,"test/DatabaseTest.sav", "/tmp/Test.sav")
+# user home expansion
+opal.file_read(o,"DatabaseTest.sav", "~/coucou/pwel.sav")
+opal.logout(o)
+}
opal.file_rm(opal, path)
opal.file_rm(opal, path)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# remove a file
-opal.file_rm(o, '/home/administrator/export/some-data.csv')
-# remove recursively a folder
-opal.file_rm(o, '/home/administrator/export')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# remove a file
+opal.file_rm(o, '/home/administrator/export/some-data.csv')
+# remove recursively a folder
+opal.file_rm(o, '/home/administrator/export')
+opal.logout(o)
+}
opal.file_unzip(opal, source, destination, key = NULL)
opal.file_unzip(opal, source, destination, key = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# unzip
-path <- opal.file_unzip(o, "/tmp/TESTING.zip", "/home/administrator")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# unzip
+path <- opal.file_unzip(o, "/tmp/TESTING.zip", "/home/administrator")
+opal.logout(o)
+}
opal.file_upload(opal, source, destination, all.files = TRUE)
opal.file_upload(opal, source, destination, all.files = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# upload a file
-opal.file_upload(o, 'some_data.csv', '/home/administrator')
-# upload a folder
-opal.file_upload(o, 'some_data', '/home/administrator')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# upload a file
+opal.file_upload(o, 'some_data.csv', '/home/administrator')
+# upload a folder
+opal.file_upload(o, 'some_data', '/home/administrator')
+opal.logout(o)
+}
opal.file_write(opal, source, destination = NULL)
opal.file_write(opal, source, destination = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# user home expansion
-opal.file_write(o, "~/spss/DatabaseTest.sav")
-# rename file
-opal.file_write(o, "/home/administrator/spss/DatabaseTest.sav", "x.sav")
-# create sub-folder
-opal.file_write(o, "/home/administrator/spss/DatabaseTest.sav", "test/x.sav")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# user home expansion
+opal.file_write(o, "~/spss/DatabaseTest.sav")
+# rename file
+opal.file_write(o, "/home/administrator/spss/DatabaseTest.sav", "x.sav")
+# create sub-folder
+opal.file_write(o, "/home/administrator/spss/DatabaseTest.sav", "test/x.sav")
+opal.logout(o)
+}
opal.get(
- opal,
- ...,
- query = list(),
- acceptType = "application/json",
- outFile = NULL,
- callback = NULL
-)
opal.get(
+ opal,
+ ...,
+ query = list(),
+ acceptType = "application/json",
+ outFile = NULL,
+ callback = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
-opal.get(o, 'project', 'CNSIM')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
+opal.get(o, 'project', 'CNSIM')
+opal.logout(o)
+}
opal.load_package(opal, pkg)
opal.load_package(opal, pkg)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.load_package(o, 'stats')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.load_package(o, 'stats')
+opal.logout(o)
+}
if (FALSE) {
-#### The below examples illustrate the different ways to login in opal ####
-
-# explicite username/password login
-o <- opal.login(username = 'administrator', password = 'password',
- url = 'https://opal-demo.obiba.org')
-opal.logout(o)
-
- # explicite personal access token login
-o <- opal.login(token = 'HYG16LO0VaX4O0UardNbiqmr2ByBpRke',
- url = 'https://opal-demo.obiba.org')
-opal.logout(o)
-
-# login using options and user credentials
-options(opal.username = 'administrator',
- opal.password = 'password',
- opal.url = 'https://opal-demo.obiba.org')
-o <- opal.login()
-opal.logout(o)
-
-# login using options and personal access token
-options(opal.token = 'HYG16LO0VaX4O0UardNbiqmr2ByBpRke',
- opal.url = 'https://opal-demo.obiba.org')
-o <- opal.login()
-opal.logout(o)
-
-# login using ssl key pair
-options(opal.opts = list(
- sslcert = 'my-publickey.pem',
- sslkey = 'my-privatekey.pem'))
-o <- opal.login(url = 'https://opal-demo.obiba.org')
-opal.logout(o)
-
-# login with a R server profile
-o <- opal.login(username = 'administrator', password = 'password',
- url = 'https://opal-demo.obiba.org', profile = 'default')
-opal.logout(o)
-}
+ if (FALSE) {
+#### The below examples illustrate the different ways to login in opal ####
+
+# explicite username/password login
+o <- opal.login(username = 'administrator', password = 'password',
+ url = 'https://opal-demo.obiba.org')
+opal.logout(o)
+
+ # explicite personal access token login
+o <- opal.login(token = 'HYG16LO0VaX4O0UardNbiqmr2ByBpRke',
+ url = 'https://opal-demo.obiba.org')
+opal.logout(o)
+
+# login using options and user credentials
+options(opal.username = 'administrator',
+ opal.password = 'password',
+ opal.url = 'https://opal-demo.obiba.org')
+o <- opal.login()
+opal.logout(o)
+
+# login using options and personal access token
+options(opal.token = 'HYG16LO0VaX4O0UardNbiqmr2ByBpRke',
+ opal.url = 'https://opal-demo.obiba.org')
+o <- opal.login()
+opal.logout(o)
+
+# login using ssl key pair
+options(opal.opts = list(
+ sslcert = 'my-publickey.pem',
+ sslkey = 'my-privatekey.pem'))
+o <- opal.login(url = 'https://opal-demo.obiba.org')
+opal.logout(o)
+
+# login with a R server profile
+o <- opal.login(username = 'administrator', password = 'password',
+ url = 'https://opal-demo.obiba.org', profile = 'default')
+opal.logout(o)
+}
opal.logout(opal, save = FALSE)
opal.logout(opal, save = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
+opal.logout(o)
+}
Get the permissions of a subject. If the subject is a user, the permissions of +the groups to which the user belongs are also added to the result.
+opal.perms(opal, subject, type = "user")
Opal connection object.
A subject identifier: user or group name.
The type of subject: user (default) or group.
A data.frame with columns: subject, type, target (path to the opal object to which +the permission applies), target_type and perm (the permission name)
+Other table functions:
+opal.resource_view_create()
,
+opal.resource_view_reconnect()
,
+opal.table_create()
,
+opal.table_delete()
,
+opal.table_dictionary_get()
,
+opal.table_dictionary_update()
,
+opal.table_exists()
,
+opal.table_export()
,
+opal.table_get()
,
+opal.table_import()
,
+opal.table_perm_add()
,
+opal.table_perm_delete()
,
+opal.table_perm()
,
+opal.table_save()
,
+opal.table_truncate()
,
+opal.table_view_create()
,
+opal.table_view_update()
if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.table_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
+opal.perms(o, 'andrei')
+opal.table_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
+
opal.post(
- opal,
- ...,
- query = list(),
- body = "",
- contentType = "application/x-rscript",
- acceptType = "application/json",
- outFile = NULL,
- callback = NULL
-)
opal.post(
+ opal,
+ ...,
+ query = list(),
+ body = "",
+ contentType = "application/x-rscript",
+ acceptType = "application/json",
+ outFile = NULL,
+ callback = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
-opal.post(o, 'some', 'resources', body = '{"some":"value"}')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
+opal.post(o, 'some', 'resources', body = '{"some":"value"}')
+opal.logout(o)
+}
opal.profiles(opal, df = TRUE)
opal.profiles(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
-opal.profiles(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
+opal.profiles(o)
+opal.logout(o)
+}
opal.project(opal, project)
opal.project(opal, project)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.project(o, 'datashield')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.project(o, 'datashield')
+opal.logout(o)
+}
opal.project_backup(
- opal,
- project,
- archive,
- viewsAsTables = FALSE,
- override = TRUE,
- wait = TRUE
-)
opal.project_backup(
+ opal,
+ project,
+ archive,
+ viewsAsTables = FALSE,
+ override = TRUE,
+ wait = TRUE
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.project_backup(o, 'GREENSPACE', '/home/administrator/backup/GREENSPACE')
-opal.file_download(o, '/home/administrator/backup/GREENSPACE', 'GREENSPACE.zip')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.project_backup(o, 'GREENSPACE', '/home/administrator/backup/GREENSPACE')
+opal.file_download(o, '/home/administrator/backup/GREENSPACE', 'GREENSPACE.zip')
+opal.logout(o)
+}
opal.project_command(opal, project, id)
opal.project_command(opal, project, id)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-id <- opal.project_backup(o, 'GREENSPACE', '/home/administrator/backup/GREENSPACE', wait = FALSE)
-opal.project_command(opal, 'GREENSPACE', id)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+id <- opal.project_backup(o, 'GREENSPACE', '/home/administrator/backup/GREENSPACE', wait = FALSE)
+opal.project_command(opal, 'GREENSPACE', id)
+opal.logout(o)
+}
opal.project_create(
- opal,
- project,
- database = NULL,
- title = NULL,
- description = NULL,
- tags = NULL,
- exportFolder = NULL
-)
opal.project_create(
+ opal,
+ project,
+ database = NULL,
+ title = NULL,
+ description = NULL,
+ tags = NULL,
+ exportFolder = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# with named database
-opal.project_create(o, 'test', database='opal_data', title='This is a test', tags=list('Test'))
-# with default database
-opal.project_create(o, 'test_default_db', database = TRUE)
-# no database, for views and resources only
-opal.project_create(o, 'test_no_db')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# with named database
+opal.project_create(o, 'test', database='opal_data', title='This is a test', tags=list('Test'))
+# with default database
+opal.project_create(o, 'test_default_db', database = TRUE)
+# no database, for views and resources only
+opal.project_create(o, 'test_no_db')
+opal.logout(o)
+}
opal.project_delete(opal, project, archive = FALSE, silent = TRUE)
opal.project_delete(opal, project, archive = FALSE, silent = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.project_delete(o, 'test')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.project_delete(o, 'test')
+opal.logout(o)
+}
opal.project_exists(opal, project)
opal.project_exists(opal, project)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.project_exists(o, 'test')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.project_exists(o, 'test')
+opal.logout(o)
+}
opal.project_perm(opal, project)
opal.project_perm(opal, project)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.project_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
-opal.project_perm(o, 'CNSIM')
-opal.project_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.project_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
+opal.project_perm(o, 'CNSIM')
+opal.project_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.project_perm_add(
- opal,
- project,
- subject,
- type = "user",
- permission = "administrate"
-)
opal.project_perm_add(
+ opal,
+ project,
+ subject,
+ type = "user",
+ permission = "administrate"
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.project_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
-opal.project_perm(o, 'CNSIM')
-opal.project_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.project_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
+opal.project_perm(o, 'CNSIM')
+opal.project_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.project_perm_delete(opal, project, subject, type = "user")
opal.project_perm_delete(opal, project, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.project_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
-opal.project_perm(o, 'CNSIM')
-opal.project_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.project_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
+opal.project_perm(o, 'CNSIM')
+opal.project_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.project_restore(
- opal,
- project,
- archive,
- key = NULL,
- override = TRUE,
- wait = TRUE
-)
opal.project_restore(
+ opal,
+ project,
+ archive,
+ key = NULL,
+ override = TRUE,
+ wait = TRUE
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# create the project to restore, with the default database (to store tables)
-opal.project_create(o, 'GREENSPACE2', database = TRUE)
-# upload backup zip and launch restore task
-opal.file_upload(o, 'GREENSPACE.zip', '/home/administrator')
-opal.project_restore(o, 'GREENSPACE2', '/home/administrator/GREENSPACE.zip')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# create the project to restore, with the default database (to store tables)
+opal.project_create(o, 'GREENSPACE2', database = TRUE)
+# upload backup zip and launch restore task
+opal.file_upload(o, 'GREENSPACE.zip', '/home/administrator')
+opal.project_restore(o, 'GREENSPACE2', '/home/administrator/GREENSPACE.zip')
+opal.logout(o)
+}
opal.projects(opal, df = TRUE)
opal.projects(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.projects(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.projects(o)
+opal.logout(o)
+}
opal.projects_databases(opal)
opal.projects_databases(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.projects_databases(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.projects_databases(o)
+opal.logout(o)
+}
opal.put(
- opal,
- ...,
- query = list(),
- body = "",
- contentType = "application/x-rscript",
- callback = NULL
-)
opal.put(
+ opal,
+ ...,
+ query = list(),
+ body = "",
+ contentType = "application/x-rscript",
+ callback = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
-opal.put(o, 'some', 'resource', 'toupdate', body = '{"some":"value"}')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
+opal.put(o, 'some', 'resource', 'toupdate', body = '{"some":"value"}')
+opal.logout(o)
+}
opal.report(
- input,
- output = NULL,
- progress = FALSE,
- verbose = FALSE,
- boot_style = NULL
-)
opal.report(
+ input,
+ output = NULL,
+ progress = FALSE,
+ verbose = FALSE,
+ boot_style = NULL
+)
if (FALSE) {
-opal.report('input.Rmd', 'report', progress=TRUE)
-}
+ if (FALSE) {
+opal.report('input.Rmd', 'report', progress=TRUE)
+}
opal.report_md(inputFile, progress, verbose)
opal.report_md(inputFile, progress, verbose)
opal.resource(opal, project, resource)
opal.resource(opal, project, resource)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resource(o, 'RSRC', 'CNSIM1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resource(o, 'RSRC', 'CNSIM1')
+opal.logout(o)
+}
opal.resource_create(
- opal,
- project,
- name,
- url,
- description = NULL,
- format = NULL,
- package = NULL,
- identity = NULL,
- secret = NULL
-)
opal.resource_create(
+ opal,
+ project,
+ name,
+ url,
+ description = NULL,
+ format = NULL,
+ package = NULL,
+ identity = NULL,
+ secret = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resource_create(o, 'RSRC', 'CNSIM4',
- url = 'opal+https://opal-demo.obiba.org/ws/files/projects/RSRC/CNSIM3.zip',
- format = 'csv', secret = 'EeTtQGIob6haio5bx6FUfVvIGkeZJfGq')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resource_create(o, 'RSRC', 'CNSIM4',
+ url = 'opal+https://opal-demo.obiba.org/ws/files/projects/RSRC/CNSIM3.zip',
+ format = 'csv', secret = 'EeTtQGIob6haio5bx6FUfVvIGkeZJfGq')
+opal.logout(o)
+}
opal.resource_delete(opal, project, resource, silent = TRUE)
opal.resource_delete(opal, project, resource, silent = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resource_delete(o, "RSRC", "CNSIM4")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resource_delete(o, "RSRC", "CNSIM4")
+opal.logout(o)
+}
opal.resource_exists(opal, project, resource)
opal.resource_exists(opal, project, resource)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resource_exists(o, 'RSRC', 'CNSIM1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resource_exists(o, 'RSRC', 'CNSIM1')
+opal.logout(o)
+}
opal.resource_extension_create(
- opal,
- project,
- name,
- provider,
- factory,
- parameters,
- description = NULL,
- credentials = NULL
-)
opal.resource_extension_create(
+ opal,
+ project,
+ name,
+ provider,
+ factory,
+ parameters,
+ description = NULL,
+ credentials = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resource_extension_create(o, 'RSRC', 'ga4gh_1000g',
- provider = 'dsOmics', factory = 'ga4gh-htsget',
- parameters = list(
- host = 'https://htsget.ga4gh.org',
- sample = '1000genomes.phase1.chr1',
- reference = '1',
- start = '1',
- end = '100000',
- format = 'GA4GHVCF'
- )
-)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resource_extension_create(o, 'RSRC', 'ga4gh_1000g',
+ provider = 'dsOmics', factory = 'ga4gh-htsget',
+ parameters = list(
+ host = 'https://htsget.ga4gh.org',
+ sample = '1000genomes.phase1.chr1',
+ reference = '1',
+ start = '1',
+ end = '100000',
+ format = 'GA4GHVCF'
+ )
+)
+opal.logout(o)
+}
opal.resource_get(opal, project, resource)
opal.resource_get(opal, project, resource)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-res <- opal.resource_get(o, 'RSRC', 'CNSIM1')
-# then interpret locally the resource object (load the appropriate R packages)
-library(resourcer)
-# coerce to a data.frame
-as.data.frame(res)
-# or get the resource client object for low-level interactions
-rescli <- resourcer::newResourceClient(res)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+res <- opal.resource_get(o, 'RSRC', 'CNSIM1')
+# then interpret locally the resource object (load the appropriate R packages)
+library(resourcer)
+# coerce to a data.frame
+as.data.frame(res)
+# or get the resource client object for low-level interactions
+rescli <- resourcer::newResourceClient(res)
+opal.logout(o)
+}
opal.resource_perm(opal, project, resource)
opal.resource_perm(opal, project, resource)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resource_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
-opal.resource_perm(o, 'CNSIM', 'CNSIM1')
-opal.resource_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resource_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
+opal.resource_perm(o, 'CNSIM', 'CNSIM1')
+opal.resource_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.resource_perm_add(
- opal,
- project,
- resource,
- subject,
- type = "user",
- permission
-)
opal.resource_perm_add(
+ opal,
+ project,
+ resource,
+ subject,
+ type = "user",
+ permission
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resource_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
-opal.resource_perm(o, 'CNSIM', 'CNSIM1')
-opal.resource_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resource_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
+opal.resource_perm(o, 'CNSIM', 'CNSIM1')
+opal.resource_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.resource_perm_delete(opal, project, resource, subject, type = "user")
opal.resource_perm_delete(opal, project, resource, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resource_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
-opal.resource_perm(o, 'CNSIM', 'CNSIM1')
-opal.resource_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resource_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
+opal.resource_perm(o, 'CNSIM', 'CNSIM1')
+opal.resource_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.resource_view_create(
- opal,
- project,
- table,
- resource,
- type = "Participant",
- idColumn = NULL,
- profile = NULL
-)
opal.resource_view_create(
+ opal,
+ project,
+ table,
+ resource,
+ type = "Participant",
+ idColumn = NULL,
+ profile = NULL
+)
Other table functions:
+opal.perms()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
opal.table_delete()
,
@@ -139,14 +140,14 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# make a view over a resource
-opal.resource_view_create(o, "CNSIM", "CNSIM4", resource = "RSRC.CNSIM1")
-opal.resource_view_create(o, "CNSIM", "FEMALE_2439",
- resource = "RSRC.FEMALE_2439", idColumn = "Name")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# make a view over a resource
+opal.resource_view_create(o, "CNSIM", "CNSIM4", resource = "RSRC.CNSIM1")
+opal.resource_view_create(o, "CNSIM", "FEMALE_2439",
+ resource = "RSRC.FEMALE_2439", idColumn = "Name")
+opal.logout(o)
+}
opal.resource_view_reconnect(opal, project, table)
opal.resource_view_reconnect(opal, project, table)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.table_create()
,
opal.table_delete()
,
@@ -113,14 +114,14 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# make a view over a resource
-opal.resource_view_create(o, "CNSIM", "CNSIM4", resource = "RSRC.CNSIM1")
-# re-initialize the view's connection to the resource
-opal.resource_view_reconnect(o, "CNSIM", "CNSIM4")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# make a view over a resource
+opal.resource_view_create(o, "CNSIM", "CNSIM4", resource = "RSRC.CNSIM1")
+# re-initialize the view's connection to the resource
+opal.resource_view_reconnect(o, "CNSIM", "CNSIM4")
+opal.logout(o)
+}
opal.resources(opal, project, df = TRUE)
opal.resources(opal, project, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resources(o, 'RSRC')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resources(o, 'RSRC')
+opal.logout(o)
+}
opal.resources_perm(opal, project)
opal.resources_perm(opal, project)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resources_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'view')
-opal.resources_perm(o, 'CNSIM')
-opal.resources_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resources_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'view')
+opal.resources_perm(o, 'CNSIM')
+opal.resources_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.resources_perm_add(opal, project, subject, type = "user", permission)
opal.resources_perm_add(opal, project, subject, type = "user", permission)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resources_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'view')
-opal.resources_perm(o, 'CNSIM')
-opal.resources_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resources_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'view')
+opal.resources_perm(o, 'CNSIM')
+opal.resources_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.resources_perm_delete(opal, project, subject, type = "user")
opal.resources_perm_delete(opal, project, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.resources_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
-opal.resources_perm(o, 'CNSIM', 'CNSIM1')
-opal.resources_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.resources_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
+opal.resources_perm(o, 'CNSIM', 'CNSIM1')
+opal.resources_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.rm(opal, symbol)
opal.rm(opal, symbol)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.rm(o, 'D')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.rm(o, 'D')
+opal.logout(o)
+}
opal.sql(opal, query, project = NULL, id.name = "_id")
opal.sql(opal, query, project = NULL, id.name = "_id")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# with project context
-opal.sql(o,
- 'select avg(LAB_HDL) as HDL_AVG, GENDER
- from CNSIM1
- where LAB_HDL is not null
- group by GENDER',
- 'CNSIM')
-# without project context
-opal.sql(o,
- 'select avg(LAB_HDL) as HDL_AVG, GENDER
- from `CNSIM.CNSIM1`
- where LAB_HDL is not null
- group by GENDER')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# with project context
+opal.sql(o,
+ 'select avg(LAB_HDL) as HDL_AVG, GENDER
+ from CNSIM1
+ where LAB_HDL is not null
+ group by GENDER',
+ 'CNSIM')
+# without project context
+opal.sql(o,
+ 'select avg(LAB_HDL) as HDL_AVG, GENDER
+ from `CNSIM.CNSIM1`
+ where LAB_HDL is not null
+ group by GENDER')
+opal.logout(o)
+}
opal.sql_history(
- opal,
- project = NULL,
- offset = 0,
- limit = 100,
- user = NULL,
- df = TRUE
-)
opal.sql_history(
+ opal,
+ project = NULL,
+ offset = 0,
+ limit = 100,
+ user = NULL,
+ df = TRUE
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# with project context
-opal.sql_history(o, 'CNSIM')
-# without project context
-opal.sql_history(o, NA)
-# with or without project context
-opal.sql_history(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# with project context
+opal.sql_history(o, 'CNSIM')
+# without project context
+opal.sql_history(o, NA)
+# with or without project context
+opal.sql_history(o)
+opal.logout(o)
+}
opal.symbol_import(
- opal,
- symbol,
- project,
- identifiers = NULL,
- policy = "required",
- id.name = "id",
- type = "Participant",
- wait = TRUE
-)
opal.symbol_import(
+ opal,
+ symbol,
+ project,
+ identifiers = NULL,
+ policy = "required",
+ id.name = "id",
+ type = "Participant",
+ wait = TRUE
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.symbol_import(o, 'D', 'test')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.symbol_import(o, 'D', 'test')
+opal.logout(o)
+}
opal.symbol_rm(opal, symbol)
opal.symbol_rm(opal, symbol)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.symbol_rm(o, 'D')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.symbol_rm(o, 'D')
+opal.logout(o)
+}
opal.symbol_save(opal, symbol, destination)
opal.symbol_save(opal, symbol, destination)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.symbol_save(o, 'D', 'test.sav')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.symbol_save(o, 'D', 'test.sav')
+opal.logout(o)
+}
opal.symbols(opal)
opal.symbols(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.symbols(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.symbols(o)
+opal.logout(o)
+}
opal.table(opal, datasource, table, counts = FALSE)
opal.table(opal, datasource, table, counts = FALSE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.table(o, 'CNSIM', 'CNSIM1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.table(o, 'CNSIM', 'CNSIM1')
+opal.logout(o)
+}
opal.table_create(opal, project, table, type = "Participant", tables = NULL)
opal.table_create(opal, project, table, type = "Participant", tables = NULL)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_delete()
,
@@ -122,15 +123,15 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# make a raw table
-opal.table_create(o, "CNSIM", "CNSIM4")
-# make a view
-opal.table_create(o, "CNSIM", "CNSIM123",
- tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# make a raw table
+opal.table_create(o, "CNSIM", "CNSIM4")
+# make a view
+opal.table_create(o, "CNSIM", "CNSIM123",
+ tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))
+opal.logout(o)
+}
opal.table_delete(opal, project, table, silent = TRUE)
opal.table_delete(opal, project, table, silent = TRUE)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -115,11 +116,11 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.table_delete(o, "CNSIM", "CNSIM1")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.table_delete(o, "CNSIM", "CNSIM1")
+opal.logout(o)
+}
opal.table_dictionary_get(opal, project, table)
opal.table_dictionary_get(opal, project, table)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -109,11 +110,11 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-dico <- opal.table_dictionary_get(o, "CNSIM", "CNSIM1")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+dico <- opal.table_dictionary_get(o, "CNSIM", "CNSIM1")
+opal.logout(o)
+}
opal.table_dictionary_update(
- opal,
- project,
- table,
- variables,
- categories = NULL
-)
opal.table_dictionary_update(
+ opal,
+ project,
+ table,
+ variables,
+ categories = NULL
+)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -124,23 +125,23 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-variables <- tibble::tribble(
- ~name, ~valueType, ~`label:en`, ~`Namespace::Name`, ~unit, ~repeatable, ~index,
- "mpg", "decimal", "Mpg label", "Value1", "years", 0, 1,
- "cyl", "decimal", "Cyl label", "Value2", "kg/m2", 0, 2,
- "disp", "decimal", "Disp label", NA, NA, 1, 3
-)
-categories <- tibble::tribble(
- ~variable, ~name, ~missing, ~`label:en`, ~`label:fr`,
- "cyl", "4", 0, "Four", "Quatre",
- "cyl", "6", 0, "Six", "Six",
- "cyl", "8", 1, "Height", "Huit"
-)
-opal.table_dictionary_update(o, "test", "mtcars", variables, categories)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+variables <- tibble::tribble(
+ ~name, ~valueType, ~`label:en`, ~`Namespace::Name`, ~unit, ~repeatable, ~index,
+ "mpg", "decimal", "Mpg label", "Value1", "years", 0, 1,
+ "cyl", "decimal", "Cyl label", "Value2", "kg/m2", 0, 2,
+ "disp", "decimal", "Disp label", NA, NA, 1, 3
+)
+categories <- tibble::tribble(
+ ~variable, ~name, ~missing, ~`label:en`, ~`label:fr`,
+ "cyl", "4", 0, "Four", "Quatre",
+ "cyl", "6", 0, "Six", "Six",
+ "cyl", "8", 1, "Height", "Huit"
+)
+opal.table_dictionary_update(o, "test", "mtcars", variables, categories)
+opal.logout(o)
+}
opal.table_exists(opal, project, table, view = NA)
opal.table_exists(opal, project, table, view = NA)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -116,16 +117,16 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# check table exists
-opal.table_exists(o, "CNSIM", "CNSIM1")
-# check table exists AND is a NOT a view
-opal.table_exists(o, "CNSIM", "CNSIM1", view = FALSE)
-# check table exists AND is a view
-opal.table_exists(o, "CNSIM", "CNSIM1", view = TRUE)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# check table exists
+opal.table_exists(o, "CNSIM", "CNSIM1")
+# check table exists AND is a NOT a view
+opal.table_exists(o, "CNSIM", "CNSIM1", view = FALSE)
+# check table exists AND is a view
+opal.table_exists(o, "CNSIM", "CNSIM1", view = TRUE)
+opal.logout(o)
+}
opal.table_export(
- opal,
- project,
- table,
- file,
- identifiers = NULL,
- id.name = "id",
- wait = TRUE
-)
opal.table_export(
+ opal,
+ project,
+ table,
+ file,
+ identifiers = NULL,
+ id.name = "id",
+ wait = TRUE
+)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -140,12 +141,12 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-cqx <- opal.table_export(o, "CNSIM", "CNSIM1",
- file = "/home/administrator/cnsim1.sav")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+cqx <- opal.table_export(o, "CNSIM", "CNSIM1",
+ file = "/home/administrator/cnsim1.sav")
+opal.logout(o)
+}
opal.table_get(
- opal,
- project,
- table,
- id.name = "id",
- variables = NULL,
- missings = TRUE
-)
opal.table_get(
+ opal,
+ project,
+ table,
+ id.name = "id",
+ variables = NULL,
+ missings = TRUE
+)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -132,11 +133,11 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
+opal.logout(o)
+}
opal.table_import(
- opal,
- file,
- project,
- table,
- identifiers = NULL,
- policy = "required",
- id.name = "id",
- type = "Participant",
- wait = TRUE
-)
opal.table_import(
+ opal,
+ file,
+ project,
+ table,
+ identifiers = NULL,
+ policy = "required",
+ id.name = "id",
+ type = "Participant",
+ wait = TRUE
+)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -151,11 +152,11 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.table_import(o, '/home/administrator/mydataset.rds', 'test', 'mytable')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.table_import(o, '/home/administrator/mydataset.rds', 'test', 'mytable')
+opal.logout(o)
+}
opal.table_perm(opal, project, table)
opal.table_perm(opal, project, table)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -115,13 +116,13 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.table_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
-opal.table_perm(o, 'CNSIM', 'CNSIM1')
-opal.table_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.table_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
+opal.table_perm(o, 'CNSIM', 'CNSIM1')
+opal.table_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.table_perm_add(opal, project, table, subject, type = "user", permission)
opal.table_perm_add(opal, project, table, subject, type = "user", permission)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -122,13 +123,13 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.table_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
-opal.table_perm(o, 'CNSIM', 'CNSIM1')
-opal.table_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.table_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
+opal.table_perm(o, 'CNSIM', 'CNSIM1')
+opal.table_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.table_perm_delete(opal, project, table, subject, type = "user")
opal.table_perm_delete(opal, project, table, subject, type = "user")
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -117,13 +118,13 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.table_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
-opal.table_perm(o, 'CNSIM', 'CNSIM1')
-opal.table_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.table_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
+opal.table_perm(o, 'CNSIM', 'CNSIM1')
+opal.table_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.table_save(
- opal,
- tibble,
- project,
- table,
- overwrite = TRUE,
- force = FALSE,
- identifiers = NULL,
- policy = "required",
- id.name = "id",
- type = "Participant"
-)
opal.table_save(
+ opal,
+ tibble,
+ project,
+ table,
+ overwrite = TRUE,
+ force = FALSE,
+ identifiers = NULL,
+ policy = "required",
+ id.name = "id",
+ type = "Participant"
+)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -162,15 +163,15 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
-# do some (meta)data transformations, then save in opal's database
-opal.table_save(o, cqx, "CPTP", "Cag_coreqx", overwrite = TRUE, force = TRUE)
-# or overwrite data only (keep original data dictionary)
-opal.table_save(o, cqx, "CPTP", "Cag_coreqx", overwrite = 'values', force = TRUE)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+cqx <- opal.table_get(o, "CPTP", "Cag_coreqx")
+# do some (meta)data transformations, then save in opal's database
+opal.table_save(o, cqx, "CPTP", "Cag_coreqx", overwrite = TRUE, force = TRUE)
+# or overwrite data only (keep original data dictionary)
+opal.table_save(o, cqx, "CPTP", "Cag_coreqx", overwrite = 'values', force = TRUE)
+opal.logout(o)
+}
opal.table_truncate(opal, project, table)
opal.table_truncate(opal, project, table)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -111,11 +112,11 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.table_truncate(o, "CNSIM", "CNSIM1")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.table_truncate(o, "CNSIM", "CNSIM1")
+opal.logout(o)
+}
opal.table_view_create(opal, project, table, tables, type = "Participant")
opal.table_view_create(opal, project, table, tables, type = "Participant")
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -122,13 +123,13 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# make a view
-opal.table_view_create(o, "CNSIM", "CNSIM123",
- c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# make a view
+opal.table_view_create(o, "CNSIM", "CNSIM123",
+ c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))
+opal.logout(o)
+}
opal.table_view_update(opal, project, table, tables = NULL, where = NULL)
opal.table_view_update(opal, project, table, tables = NULL, where = NULL)
Other table functions:
+opal.perms()
,
opal.resource_view_create()
,
opal.resource_view_reconnect()
,
opal.table_create()
,
@@ -121,28 +122,28 @@
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# make a view
-opal.table_view_create(o, "CNSIM", "CNSIM123",
- c("CNSIM.CNSIM1"))
-
-# update the table references
-opal.table_view_update(o, "CNSIM", "CNSIM123",
- tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))
-
-# update the entity filter
-opal.table_view_update(o, "CNSIM", "CNSIM123", where = "$('LAB_TSC').ge(5)")
-
-# remove the entity filter
-opal.table_view_update(o, "CNSIM", "CNSIM123", where = "")
-
-# update both the table references and the entity filter
-opal.table_view_update(o, "CNSIM", "CNSIM123",
- tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"),
- where = "$('LAB_TSC').ge(5)")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# make a view
+opal.table_view_create(o, "CNSIM", "CNSIM123",
+ c("CNSIM.CNSIM1"))
+
+# update the table references
+opal.table_view_update(o, "CNSIM", "CNSIM123",
+ tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"))
+
+# update the entity filter
+opal.table_view_update(o, "CNSIM", "CNSIM123", where = "$('LAB_TSC').ge(5)")
+
+# remove the entity filter
+opal.table_view_update(o, "CNSIM", "CNSIM123", where = "")
+
+# update both the table references and the entity filter
+opal.table_view_update(o, "CNSIM", "CNSIM123",
+ tables = c("CNSIM.CNSIM1", "CNSIM.CNSIM2", "CNSIM.CNSIM3"),
+ where = "$('LAB_TSC').ge(5)")
+opal.logout(o)
+}
opal.tables(opal, datasource, counts = FALSE, df = TRUE)
opal.tables(opal, datasource, counts = FALSE, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.tables(o, 'CNSIM')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.tables(o, 'CNSIM')
+opal.logout(o)
+}
opal.tables_perm(opal, project)
opal.tables_perm(opal, project)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.tables_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
-opal.tables_perm(o, 'CNSIM')
-opal.tables_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.tables_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
+opal.tables_perm(o, 'CNSIM')
+opal.tables_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.tables_perm_add(opal, project, subject, type = "user", permission)
opal.tables_perm_add(opal, project, subject, type = "user", permission)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.tables_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
-opal.tables_perm(o, 'CNSIM')
-opal.tables_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.tables_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
+opal.tables_perm(o, 'CNSIM')
+opal.tables_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.tables_perm_delete(opal, project, subject, type = "user")
opal.tables_perm_delete(opal, project, subject, type = "user")
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.tables_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
-opal.tables_perm(o, 'CNSIM')
-opal.tables_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.tables_perm_add(o, 'CNSIM', c('andrei', 'valentina'), 'user', 'administrate')
+opal.tables_perm(o, 'CNSIM')
+opal.tables_perm_delete(o, 'CNSIM', c('andrei', 'valentina'), 'user')
+opal.logout(o)
+}
opal.task(opal, id)
opal.task(opal, id)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.task(o, '1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.task(o, '1')
+opal.logout(o)
+}
opal.task_cancel(opal, id)
opal.task_cancel(opal, id)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.task_cancel(o, '1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.task_cancel(o, '1')
+opal.logout(o)
+}
opal.task_wait(opal, id, max = NULL)
opal.task_wait(opal, id, max = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.task_wait(o, '1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.task_wait(o, '1')
+opal.logout(o)
+}
opal.tasks(opal, df = TRUE)
opal.tasks(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.tasks(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.tasks(o)
+opal.logout(o)
+}
opal.taxonomies(opal, locale = "en", df = TRUE)
opal.taxonomies(opal, locale = "en", df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.taxonomies(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.taxonomies(o)
+opal.logout(o)
+}
opal.taxonomy(opal, taxonomy)
opal.taxonomy(opal, taxonomy)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.taxonomy(o, 'Mlstr_area')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.taxonomy(o, 'Mlstr_area')
+opal.logout(o)
+}
opal.taxonomy_delete(opal, taxonomy)
opal.taxonomy_delete(opal, taxonomy)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.taxonomy_delete(o, 'Mlstr_area')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.taxonomy_delete(o, 'Mlstr_area')
+opal.logout(o)
+}
opal.taxonomy_download(opal, taxonomy, destination = NULL)
opal.taxonomy_download(opal, taxonomy, destination = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.taxonomy_download(o, 'Mlstr_area', '~/some/dir/Mlstr_area.yml')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.taxonomy_download(o, 'Mlstr_area', '~/some/dir/Mlstr_area.yml')
+opal.logout(o)
+}
opal.taxonomy_upload(opal, path)
opal.taxonomy_upload(opal, path)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.taxonomy_upload(o, '~/some/dir/taxo.yml')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.taxonomy_upload(o, '~/some/dir/taxo.yml')
+opal.logout(o)
+}
opal.terms(opal, taxonomy, vocabulary, locale = "en", df = TRUE)
opal.terms(opal, taxonomy, vocabulary, locale = "en", df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.terms(o, 'Mlstr_area', 'Lifestyle_behaviours')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.terms(o, 'Mlstr_area', 'Lifestyle_behaviours')
+opal.logout(o)
+}
opal.token(opal, name)
opal.token(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.token(o, 'sql-1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.token(o, 'sql-1')
+opal.logout(o)
+}
opal.token_datashield_create(opal, name, projects = NULL)
opal.token_datashield_create(opal, name, projects = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-token <- opal.token_datashield_create(o, 'ds-1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+token <- opal.token_datashield_create(o, 'ds-1')
+opal.logout(o)
+}
opal.token_delete(opal, name)
opal.token_delete(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.token_delete(o, 'sql-1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.token_delete(o, 'sql-1')
+opal.logout(o)
+}
opal.token_r_create(
- opal,
- name,
- projects = NULL,
- access = NULL,
- commands = c("export")
-)
opal.token_r_create(
+ opal,
+ name,
+ projects = NULL,
+ access = NULL,
+ commands = c("export")
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-token <- opal.token_r_create(o, 'r-1', access = 'READ', commands = 'export')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+token <- opal.token_r_create(o, 'r-1', access = 'READ', commands = 'export')
+opal.logout(o)
+}
opal.token_renew(opal, name)
opal.token_renew(opal, name)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.token_renew(o, 'sql-1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.token_renew(o, 'sql-1')
+opal.logout(o)
+}
opal.token_sql_create(opal, name, projects = NULL)
opal.token_sql_create(opal, name, projects = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-token <- opal.token_sql_create(o, 'sql-1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+token <- opal.token_sql_create(o, 'sql-1')
+opal.logout(o)
+}
opal.tokens(opal, df = TRUE)
opal.tokens(opal, df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.tokens(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.tokens(o)
+opal.logout(o)
+}
opal.unload_package(opal, pkg)
opal.unload_package(opal, pkg)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.unload_package(o, 'stats')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.unload_package(o, 'stats')
+opal.logout(o)
+}
opal.valueset(opal, datasource, table, identifier)
opal.valueset(opal, datasource, table, identifier)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.valueset(o, 'CNSIM', 'CNSIM1', '1008573362')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.valueset(o, 'CNSIM', 'CNSIM1', '1008573362')
+opal.logout(o)
+}
opal.variable(opal, datasource, table, variable)
opal.variable(opal, datasource, table, variable)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.variable(o, 'CNSIM', 'CNSIM1', 'GENDER')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.variable(o, 'CNSIM', 'CNSIM1', 'GENDER')
+opal.logout(o)
+}
opal.variable_summary(
- opal,
- datasource,
- table,
- variable,
- cached = TRUE,
- nature = NULL
-)
opal.variable_summary(
+ opal,
+ datasource,
+ table,
+ variable,
+ cached = TRUE,
+ nature = NULL
+)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.variable_summary(o, 'CNSIM', 'CNSIM1', 'GENDER')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.variable_summary(o, 'CNSIM', 'CNSIM1', 'GENDER')
+opal.logout(o)
+}
opal.variables(opal, datasource, table, locale = "en", df = TRUE)
opal.variables(opal, datasource, table, locale = "en", df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.variables(o, 'CNSIM', 'CNSIM1')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.variables(o, 'CNSIM', 'CNSIM1')
+opal.logout(o)
+}
opal.version_compare(opal, version)
opal.version_compare(opal, version)
if (FALSE) {
-o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
-opal.version_compare(o, "2.6.0")
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url = 'https://opal-demo.obiba.org')
+opal.version_compare(o, "2.6.0")
+opal.logout(o)
+}
opal.vocabularies(opal, taxonomy, locale = "en", df = TRUE)
opal.vocabularies(opal, taxonomy, locale = "en", df = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.vocabularies(o, 'Mlstr_area')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.vocabularies(o, 'Mlstr_area')
+opal.logout(o)
+}
opal.vocabulary(opal, taxonomy, vocabulary)
opal.vocabulary(opal, taxonomy, vocabulary)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.vocabulary(o, 'Mlstr_area', 'Lifestyle_behaviours')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.vocabulary(o, 'Mlstr_area', 'Lifestyle_behaviours')
+opal.logout(o)
+}
opal.workspace_restore(opal, ws)
opal.workspace_restore(opal, ws)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.workspace_restore(o, 'test')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.workspace_restore(o, 'test')
+opal.logout(o)
+}
opal.workspace_rm(opal, ws, user = NULL)
opal.workspace_rm(opal, ws, user = NULL)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.workspace_rm(o, 'test')
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.workspace_rm(o, 'test')
+opal.logout(o)
+}
opal.workspace_save(opal, save = TRUE)
opal.workspace_save(opal, save = TRUE)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-# provide a workspace ID
-opal.workspace_save(o, 'test')
-# or use default one
-id <- opal.workspace_save(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+# provide a workspace ID
+opal.workspace_save(o, 'test')
+# or use default one
+id <- opal.workspace_save(o)
+opal.logout(o)
+}
opal.workspaces(opal)
opal.workspaces(opal)
if (FALSE) {
-o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
-opal.workspaces(o)
-opal.logout(o)
-}
+ if (FALSE) {
+o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
+opal.workspaces(o)
+opal.logout(o)
+}