Optimization in R

I have written some code for doing mathematical optimization in R.