Google Summer of Code 2014


Cern Sft Template Information

Complete ROOTR: an R interface for ROOT 5 and 6 with Cint/Cling support.

Abstract: ROOT - R interface

Provide a short (one paragraph) description of your proposal.
Description: Develop an interface in ROOT to call R function using the R C++ interface (Rcpp, see As a proof of concept implement the Minimizer interface of ROOT to use a R package for minimization. Developing this interface opens the possibility in ROOT to use the very large set of mathematical and statistical tools provided by R.
Implement C++ class(es) to perform a conversion of ROOT C++ object to R objects, transform the returned R objects into ROOT C++ objects.
Expected Results: One or more C++ classes which perform the conversion of ROOT C++ object to R objects, able to call R functions and transform the returned R objects in ROOT C++ objects. The class(es) should implement some of the existing algorithm interface in ROOT, so that the R functionality can be used directly for fitting or statistical studies in ROOT.
Mentor: Lorenzo Moneta
Requirements: Basic knowledge of C++. Knowledge of ROOT and/or R would be advantages.


Describe your application in detail. Provide some background, describe the work that you are expecting to do in the time leading to the GSoC start.
Basic Desing
Basic Desing I will create a library called libRInterface which will be in charge of communicationg ROOTwith R through RCpp and RInside packages(also based in RCpp).


What do you expect as a deliverable for your project? Please try to be as precise as you can (e.g. a ready to deploy package (or a patch) ABC implementing XYZ feature tested on Linux/Mac/Windows)
Source Code in an repository that lets you use R in ROOT with the next features:

  1. Classes TRInterface, TRFunction and TRObjectProxy:
    1. With support to pass basic objects from ROOT like TArrays, TVectors and (if is posible TMatrix), with templates for Double_t, Float_t and Int_t to R
    2. With support to pass objects from standard c++ like std::vector, std::map, std::list, std::array with templates for Double_t, Float_t and Int_t to R
    3. That lets you pass string values (char*, std::string, TString) and string arrays to R
    4. That lets parse R code and get the return value using std::vector,TVector, TArray,TString (or if is posible TMatrix).
    5. That lets you run functions passed from string (the string can have C-Functions if is posible).
    6. with operators overloaded for facilities.
    7. with support to run on root interpreter.
  2. Examples and tests codes:
    1. An interpolation example passing points from ROOT to R and calling the R’s interpolation functions, result will be plotted whit ROOT’s TGraph class.
    2. Other basic examples calling some useful funtions of R
    3. test cases for every feature
  3. Integrate to ROOT:
    1. support for autotools and CMake
    2. support for Linux
    3. support for c++11