# Linear programming / linear optimization with R? [closed]

Any good books or websites that teach linear programming / linear optimization with R? Thanks.

Edit (Jan 6, 2013): The following R code is an example by using the "lpSolve" package.

# Maximize
#   x1 + 9 x2 +   x3
# Subject to:
#   x1 + 2 x2 + 3 x3 <= 9
# 3 x1 + 2 x2 + 2 x3 <= 15
f.obj <- c(1, 9, 3)
f.con <- matrix(c(1, 2, 3, 3, 2, 2), nrow = 2, byrow = TRUE)
f.dir <- c("<=", "<=")
f.rhs <- c(9, 15)

lp("max", f.obj, f.con, f.dir, f.rhs)
lp("max", f.obj, f.con, f.dir, f.rhs)\$solution

-

## closed as off topic by Arkamis, Thomas, rschwieb, Asaf Karagila, Jason DeVitoOct 22 '12 at 19:01

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.