Learn R Programming

opalr (version 3.3.1)

opal.resource_view_create: Create an Opal view over a resource reference

Description

Create an Opal view if a table with same name does not already exist. The resource reference is required.The dictionary of the created view will be discovered at initialization time. Use opal.table_dictionary_update to apply a dictionary.

Usage

opal.resource_view_create(
  opal,
  project,
  table,
  resource,
  type = "Participant",
  idColumn = NULL,
  profile = NULL
)

Arguments

opal

Opal connection object.

project

Project name where the view will be located.

table

View name to be created.

resource

Fully qualified resource name.

type

Entity type, default is "Participant".

idColumn

Name of the column which contains the entity identifiers. If not specified, the first column will be used.

profile

R server profile to use for establishing the connection with the resource. If not specifed, the profile will guessed based on the resource definition.

See Also

Other table functions: 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()

Examples

Run this code
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)
}

Run the code above in your browser using DataLab