Set of optimization routines for R