lpmodel.eval: Evaluates an object inside 'lpmodel'

View source: R/lpmodel.R

lpmodel.evalR Documentation

Evaluates an object inside lpmodel

Description

This function returns the matrix or vector depending on the class of the variable in the lpmodel object. In the design of the lpinfer module, objects in lpmodel can have three different types of classes:

  • function — If the object is a function, then the object that is evaluated by the function with the data will be returned.

  • list — If the object is a list, then the i-th element will be returned.

  • matrix or numeric — If the object is a matrix or in a vector, then it will be directly returned.

Usage

lpmodel.eval(data, obj, i)

Arguments

data

A data frame.

obj

An object in lpmodel.

i

An index.

Value

Returns an object at iteration i.


conroylau/lpinfer documentation built on Oct. 23, 2022, 9:21 a.m.