Logo ROOT   6.16/01
Reference Guide
FunModule.C
Go to the documentation of this file.
1//script to test pass function into a module
2#include<TRInterface.h>
3#include<TMath.h>
4
5std::string hello( std::string who, std::string msg){
6 std::string result( "hello " ) ;
7 result += who ;
8 result += msg;
9 return result ;
10}
11
13 ROOT::R::function( "hello", &hello );
14}
15
17{
20 r["rootr"]<<LOAD_ROOTR_MODULE(rootr);
21 r<<"print(rootr$hello('world ','ROOTR'))";
22}
ROOTR_MODULE(rootr)
Definition: FunModule.C:12
std::string hello(std::string who, std::string msg)
Definition: FunModule.C:5
void FunModule()
Definition: FunModule.C:16
ROOT::R::TRInterface & r
Definition: Object.C:4
#define LOAD_ROOTR_MODULE(NAME)
Definition: RExports.h:177
const Bool_t kFALSE
Definition: RtypesCore.h:88
ROOT R was implemented using the R Project library and the modules Rcpp and RInside
Definition: TRInterface.h:137
static TRInterface & Instance()
static method to get an TRInterface instance reference
void SetVerbose(Bool_t status)
Method to set verbose mode, that produce extra output.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:151