Learn R Programming

RDataCanvas (version 0.1)

DCRuntime: DCRuntime will parse and extract Input/Output/Paramter, and return in S3 object.

Description

This function will create a runtime object(in S3) for module. In order to create a DCRuntime object, we should provide the following items:
spec.json
which defines the inputs/outputs/parameters of the module.

zetrt.json
the parameters at runtime.

arguments
the arguments from command line. In the format, like "A=1".

Usage

DCRuntime(spec_json = "spec.json", zetrt_json = NULL, args = NULL)

Arguments

spec_json
The path for "spec.json".
zetrt_json
The path for "zetrt.json". The default is NULL, which means we can get it from system environment variable "ZETRT".
args
The arguments for Input/Output with format like "A=1". The default is NULL, which means we can get it from command line arguments with "commandArgs".

Value

A S3 object.

See Also

See Screwjack about howto create a module.

Examples

Run this code
## Not run: example to use DCRuntime
#   rt <- DCRuntime(spec_json = "/your_path/spec.json",
#                       zetrt_json = "/some_path/zetrt.json")
#   # Use "rt" like this:
#   rt$Output$o1$Val
#   rt$Input$i1$Val
#   rt$Param$P1$Val
# ## End(Not run)

Run the code above in your browser using DataLab