Simplex Method in R