Using R in ROOT with the  ROOT-R package
Author: L. Moneta, O. Zapata
ROOT is  a C++ data analysis framework, providing advanced statistical methods needed by the HEP experiments for analysing their data. R is a free software framework for statistical computing, which complements the functionality of ROOT, by including some of the latest developed tools. We will present the ROOT-R package, a module in ROOT, which allows to use from the ROOT environment R functions using the low-level R C++ API provided by R. This interface opens the possibility to use in ROOT and with data stored in ROOT objects, the very large set of statistical tools present in  R. We will describe how this interface works, by converting ROOT C++ objects in R’s objects, which can be passed to the  R functions and then by converting the result back in ROOT objects.  We will show as well examples how the R tools can be used inside ROOT, in particular by presenting a ROOT a plug-in module based on the R optimization package which can be used to minimise functions in ROOT and also for fitting.