lpSolveAPI (version 5.5.2.0-17.11)

dimnames.lpExtPtr: Dimnames of an Object

Description

Retrieve or set the dimnames in an lpSolve linear program model object.

Usage

# S3 method for lpExtPtr
dimnames(x)
# S3 method for lpExtPtr
dimnames(x) <- value

Value

a list of two character vectors containing the row names and the column names in the lpSolve linear program model object.

Arguments

x

an lpSolve linear program model object.

value

a list containing two character vectors of lengths m and n specifying the row names and the column names for the lpSolve linear program model object. The number of constraints in x is denoted by m and the number of decision variables by n.

Author

Kjell Konis kjell.konis@me.com

References

https://lpsolve.sourceforge.net/5.5/index.htm

Examples

Run this code
lps.model <- make.lp(4, 0)

x <- c(6,2,4,9)
add.column(lps.model, x)

y <- c(3,1,5)
ind <- c(1,2,4)
add.column(lps.model, y, ind)

dimnames(lps.model) <- list(c("alpha", "bravo", "charlie", "delta"),
                     c("whiskey", "tango"))

Run the code above in your browser using DataLab