Retrieve the dimension (number of rows and columns) from an lpSolve linear program model object.
# S3 method for lpExtPtr dim(x) # S3 method for lpExtPtr dim(x) <- value
an lpSolve linear program model object.
assignment is not supported.
an integer vector of length two containing the number of rows and the number of columns in the lpSolve linear program model object.
Setting the number of rows/columns is not supported. See resize.lp.
resize.lp
http://lpsolve.sourceforge.net/5.5/index.htm
# NOT RUN { 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) # }
Run the code above in your browser using DataLab