Optimization of convex and non-convex functions is a basic underlying technique in many scientific and mathematical methods. To perform optimization in R, the function optim() is still one of the most widely used functions, though it has been argued that its algorithms are basic and sometimes outdated implementations and that nowadays there are better methods available in R (see also the "CRAN Task View: Optimization and Mathematical Programming"). We will give an overview of the methods for continuous global optimization in R, and present some results both in terms of computation time and accuracy of the solutions on a set of benchmark problems.