ocpu_exec: Execute code on OpenCPU server

View source: R/opencpu.R

ocpu_execR Documentation

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, corpus, server, restricted = FALSE, do.call = FALSE, ...)

Arguments

fn

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

corpus

A length-one character vector, the id of the corpus to be queried.

server

The IP/URL of the remote OpenCPU server.

restricted

A logical value, whether credentials are required to access the data.

do.call

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

...

Arguments passed into the method/function call.

Examples

## Not run: 
# Get polmineR version installed on remote server
ocpu_exec(
  fn = "packageVersion",
  server = Sys.getenv("OPENCPU_SERVER"),
  do.call = TRUE,
  pkg = "polmineR"
)

## End(Not run)

polmineR documentation built on Aug. 26, 2022, 5:15 p.m.