An R package for optimization