Using R


On client side, R is to be available. See the R installation documentation that matches your system.


The Opal Client R package is available in the official CRAN: see opalr CRAN page

You can install the Opal package and its dependencies with this command within an R session:

install.packages('opalr', dependencies=TRUE)


Accessing Opal data using R is straightforward:

# load opal library

# get a reference to the opal server
o <- opal.login('administrator','password','')

# assign some data to a data.frame

# do some analysis on the remote R session

# get the remote data.frame on the client
D <- opal.execute(o,'CNSIM1')

# or send a R script to the R server and execute it
rval <- opal.execute.source(o, '/path/to/script.R')

# clean remote R session

See also Opal R example scripts.


As the user is authenticated against Opal, the authorizations granted to this user applies. If user is only allowed to access to the variables and not the data, the data assignment to R will fail.

In addition to the data and variables related permissions, the user must have been granted the permission to use the R service.

It is highly recommended to access to a Opal server through the secured protocol HTTPS (Opal address starting with https://).

Advanced users can login to Opal by providing a key pair: certificate and private key. Example:

credentials <- list(

o <- opal.login(url='', opts=credentials)

Probably the most secure authentication method is by using a personal access token (since Opal 2.15).

o <- opal.login(token='dXvJKhk17RiO0TguRmR0EQlJxweCFyUX', url='')