12 std::vector<Double_t> sv(3);
27 std::list<std::string> names;
28 names.push_back(
"v1");
29 names.push_back(
"v2");
30 names.push_back(
"v3");
39 std::cout<<
"-----------Printing Results---------\n";
42 std::cout<<
"------------------------------------\n";
52 std::cout<<
"------------------------------------\n";
56 std::cout<<
"------------------------------------\n";
57 r<<
"df2<-data.frame(v1=c(1,2,3),v2=c('a','b','c'),v3=c(3,2,1))";
65 std::cout<<
"------------------------------------\n";
82 std::cout<<
"------------------------------------\n";
83 std::cout<<
"nrows = "<<df2.
GetNrows()<<std::endl;
84 std::cout<<
"ncols = "<<df2.
GetNcols()<<std::endl;
89 df2[
"v5"]>>df[
"var1"];
94 std::cout<<
"-----Cast---"<<std::endl;
96 r[
"df=data.frame(v1=c(0.1,0.2,0.3),v2=c(0.4,0.5,0.6))"]>>dfm;
This is a class to create DataFrames from ROOT to R.
Int_t GetNcols()
Method to get the number of colunms.
TMatrixT< T > AsMatrix()
Method to get dataframe as matrix.
void Print(const Char_t *label="")
Method to print the dataframe in stdout or a column given the label.
Int_t GetNrows()
Method to get the number of rows.
ROOT R was implemented using the R Project library and the modules Rcpp and RInside
namespace associated R package for ROOT.
Rcpp::internal::NamedPlaceHolder Label