Learn R Programming

polmineR (version 0.8.0)

ocpu_exec: Execute code on OpenCPU server

Description

ocpu_exec will execute a function/method fn on an OpenCPU server (specified by argument server), using three dots (...) to pass arguments. It is the worker of methods defined for remote_corpus, remote_subcorpus and remote_partition objects.

Usage

ocpu_exec(fn, server, user = NULL, password = NULL, do.call = FALSE,
  ...)

Arguments

fn

Name of the function/method to execute on remote server (length-one character vector).

server

The IP/URL of the remote OpenCPU server.

user

A username required for authentication, if necessary.

password

A password required for authentication, if necessary.

do.call

Logical, if TRUE, the function fn is passed into a call of do.call, which offers some flexibility.

...

Further arguments passed into the method/function call.

Examples

Run this code
# NOT RUN {
# Get polmineR version installed on remote server
ocpu_exec(
  fn = "packageVersion",
  server = Sys.getenv("OPENCPU_SERVER"),
  do.call = TRUE,
  pkg = "polmineR"
)

ocpu_exec(
  fn = "subset",
  server = Sys.getenv("OPENCPU_SERVER"),
  do.call = TRUE,
  x = iris,
  subset = substitute(Sepal.Width > 4.0)
)
# }

Run the code above in your browser using DataLab