Learn R Programming

opalr (version 3.3.1)

dsadmin.set_method: Set DataSHIELD method

Description

Set DataSHIELD method

Usage

dsadmin.set_method(
  opal,
  name,
  func = NULL,
  path = NULL,
  type = "aggregate",
  profile = NULL
)

Arguments

opal

Opal object or list of opal objects.

name

Name of the method, as it will be accessed by DataSHIELD users.

func

Function name or function code.

path

Path to the R file containing the script (mutually exclusive with func).

type

Type of the method: "aggregate" (default) or "assign"

profile

The DataSHIELD profile name to which operation applies. See also dsadmin.profiles.

See Also

Other DataSHIELD functions: dsadmin.get_methods(), dsadmin.get_method(), dsadmin.get_options(), dsadmin.install_github_package(), dsadmin.install_local_package(), dsadmin.install_package(), dsadmin.installed_package(), dsadmin.package_descriptions(), dsadmin.package_description(), dsadmin.publish_package(), dsadmin.remove_package(), dsadmin.rm_methods(), dsadmin.rm_method(), dsadmin.rm_options(), dsadmin.rm_option(), dsadmin.rm_package_methods(), dsadmin.set_option(), dsadmin.set_package_methods(), dsadmin.unpublish_package()

Examples

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

Run the code above in your browser using DataLab