QScript ROutputTranslator
(Redirected from ROutputTranslator)
Jump to navigation
Jump to search
ROutputTranslator
This class provides an interface into the R Output (ProtoBuf) and allows the user to get the data, and the attributes from the R Output
get(variable_path)
This method can be used to query the R Output's data. This can be done using R's variable notation get("variable1$member"), or an array of nested variable names get(["variable1", "member"]). If a variable cannot be found, a UserException stating so will be thrown.
variable_path | is used to locate the data from the R Output. This can be a simple variable name ("my.variable"), or a deeply nested path (["top.level", "lower.level", "key"]). variable_path can either be a string that will be split on the '$' char (similar to R), or an array of strings |
Returns: | R output in simple data types that can be interpreted by QScript code such as arrays, strings, ints, doubles |
getAttribute(variable_path, attribute)
This method can be used to query the R Output's attributes. Given a variable_path, it provides the ability to query the R attributes at that location
variable_path | is used to locate the data from the R Output. This can be a simple variable name ("my.variable"), or a deeply nested path (["top.level", "lower.level", "key"]). variable_path can either be a string that will be split on the '$' char (similar to R), or an array of strings |
attribute | is the name of the required R attribute. A common use case or attribute is "names", which can be used in conjunction with get. |
Returns: |
type
Returns the name we use to refer to this class in the documentation.