Skip to content
/ rockr Public

R client implementation of the R server REST API

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

obiba/rockr

Repository files navigation

Rock R

Build Status CRAN_Status_Badge

R implementation of the Rock R server REST API. Allows to interact with a remote R session in a stateful way.

Usage:

library(rockr)

# Make a connection object
conn <- rockr.connect('username', 'passwd', url = 'https://rock-demo.obiba.org')

# Get the status of the R server (admin only)
rockr.status(conn)

# Restart the remote R server (admin only)
rockr.start(conn)

# Open an R session
rockr.open(conn)

# Assign a R expression to a R symbol
rockr.assign(conn, 'x', 123)
rockr.assign(conn, 'y', 'hello')
rockr.assign(conn, 'z', quote(tibble::tribble(
  ~colA, ~colB,
  'a',   1,
  'b',   2,
  'c',   3
)))

# Evaluate a R expression
rockr.eval(conn, quote(x))
rockr.eval(conn, quote(ls()))
rockr.eval(conn, call("ls"))

# Asynchronous assignment and evaluation
cmd <- rockr.eval(conn, quote(z), async = TRUE)
rockr.command_result(conn, cmd$id, wait = TRUE)

# File upload and download
rockr.file_upload(conn, source = "foo", destination = "/somedir/bar")
rockr.file_download(conn, source = "/somedir/bar", destination = "foo2")

# Terminate the remote R session
rockr.close(conn)

About

R client implementation of the R server REST API

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages