Also takes the module input object input given to the module to calculate the offset of the output object. The new offset is simply (module input offset) + (shift applied during module operations) The shift applied during module operations is the offset argument.

.get_module_output(results, original_offset, additional_offset = 0)

Arguments

results

numeric vector containing output of module operations.

original_offset

integer. Input offset before computations.

additional_offset

integer. Shift resulting from operations performed in module.

Value

A list with two elements:

  1. A numeric vector named values: the result of the computations on the input data.

  2. An integer named index_offset: the offset, counted in number of time steps, by which the result is shifted compared to an index_offset of 0. This parameter allows one to keep track of the date of the first value in values without needing to carry a date column around. A positive offset means values are delayed in the future compared to the reference values. A negative offset means the opposite. Note that the index_offset of the output of the function call accounts for the (optional) index_offset of the input.

If index_offset is 0 and simplify_output = TRUE, the index_offset is dropped and the values element is returned as a numeric vector.