dim.lpExtPtr: Dimension of an Object

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/dim.lpExtPtr.q

Description

Retrieve the dimension (number of rows and columns) from an lpSolve linear program model object.

Usage

1
2
3
4
## S3 method for class 'lpExtPtr'
dim(x)
## S3 replacement method for class 'lpExtPtr'
dim(x) <- value

Arguments

x

an lpSolve linear program model object.

value

assignment is not supported.

Details

Setting the number of rows/columns is not supported. See resize.lp.

Value

an integer vector of length two containing the number of rows and the number of columns in the lpSolve linear program model object.

Author(s)

Kjell Konis [email protected]

References

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

See Also

resize.lp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

dim(lps.model)

lpSolveAPI documentation built on May 30, 2017, 7:12 a.m.