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.

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

if (FALSE) { # Get polmineR version installed on remote server ocpu_exec( fn = "packageVersion", server = Sys.getenv("OPENCPU_SERVER"), do.call = TRUE, pkg = "polmineR" ) }