We restate the problem, omitting positivity constraints on the single scalar variable x, as:
maximize 1 * x
such that
0.18 * x <= 20076
0.02 * x <= 8619
0.01 * x <= 145
0.78 * x <= 465527
0.01 * x <= 5205
so as a linear program we have the following optimum value of x:
library(lpSolve)
constr.mat <- c(.18, .02, .01, .78, .01)
RHS <- c(20076, 8619, 145, 465527, 5205)
soln <- lp("max", 1, constr.mat, "<=", RHS)
soln$solution
## [1] 14500
Of course, as pointed out in the comments below the question this problem can be solved trivially without linear programming by taking the least upper bound of x:
min(RHS / constr.mat)
## [1] 14500
Note
If what you really meant was not the problem stated in the question but rather this 5 variable problem:
max 0.18 * x1 + 0.02 * x2 + 0.01 * x3 + 0.78 * x4 + 0.01 * x5
such that
0.18 * x1 <= 20076
0.02 * x2 <= 8619
0.01 * x3 <= 145
0.78 * x4 <= 465527
0.01 * x5 <= 5205
then we have
soln2 <- lp("max", constr.mat, diag(constr.mat), "<=", RHS)
soln2$solution
## [1] 111533.3 430950.0 14500.0 596829.5 520500.0
Again this is trivial to compute without linear programming:
RHS / constr.mat
## [1] 111533.3 430950.0 14500.0 596829.5 520500.0
xis the smallestxin the range which violates one of the 5 constraints (or, 499572 if none of the constraints are violated). You don't really need linear programming with just 1 decision variable. This blog post shows how to use LPsolve in R.x = 14500.