output_obj {struct}R Documentation

Output objects

Description

Gets or sets the object of an output e.g. to an entity() object.

Usage

output_obj(obj, name)

output_obj(obj, name) <- value

## S4 method for signature 'struct_class,character'
output_obj(obj, name)

## S4 replacement method for signature 'struct_class,character'
output_obj(obj, name) <- value

Arguments

obj

A model or iterator object derived from the *struct* class

name

Name of output

value

A valid value for the output being set

Value

output_obj(M,name)

returns the named output as an object

output_obj(M,name)<-

sets the named output of an object

the modified object

Methods (by class)

Examples

# get the output as an object
M = example_model()
obj = output_obj(M, 'result_1')

# set a output as an object
output_obj(M, 'result_1') = entity(value = 15,type = 'numeric',name = 'result_1')

[Package struct version 1.2.0 Index]