distcomp-internal: Make an appropriate opencpu URL for a specified function and...

Description Usage Arguments Value Examples

Description

.makeOpencpuURL returns an appropriate URL to call a function in the distcomp package given the name of the function and a url prefix.

.defnOK returns TRUE or FALSE depending on whether the definition object meets minimimal requirements.

.deSerialize will convert the JSON result of a http response as needed, else the raw content is returned.

Usage

1
2
3
4
5
.makeOpencpuURL(fn, urlPrefix, package = "distcomp")

.defnOK(defn)

.deSerialize(q)

Arguments

fn

is the name of the function in the distcomp package

urlPrefix

is the URL of the opencpu server with the distcomp package installed

defn

is the definition object passed

q

the result of a httr response

Value

the formatted url as a string

TRUE or FALSE depending on the result

the converted result, if JSON, or the raw content

Examples

1
2
3
distcomp:::.makeOpencpuURL("foo", "http://localhost:9999/ocpu")
distcomp:::.defnOK(data.frame()) ## FALSE
distcomp:::.defnOK(data.frame(id = "ABC", stringsAsFactors=FALSE)) ## TRUE


Search within the distcomp package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.