The code in R for Nelder–Mead simplex method to find the minimum of an objective function in a multidimensional space