22   std::vector<Double_t> 
x(10),
y(10);
 
   34   if (!
gROOT->IsBatch() )  {
 
   38      r<<
"par(mfrow = c(2,1))";
 
   41      r<<
"plot(x, y, main = 'approx(.) and approxfun(.)')";
 
   45      r<<
"points(approx(x, y), col = 2, pch = '*')";
 
   46      r<<
"points(approx(x, y, method = 'constant'), col = 4, pch = '*')";
 
   49      r << 
"print('Interpolated points')";
 
   50      r << 
"print(approx(x,y,n=20))";
 
   56   r<<
"f <- approxfun(x, y)";
 
   58   r<<
"fc <- approxfun(x, y, method = 'const')";
 
   60   if (!
gROOT->IsBatch() ) {
 
   61      r<<
"curve(f(x), 0, 11, col = 'green2')";
 
   64      r<<
"curve(fc(x), 0, 10, col = 'darkblue', add = TRUE)";
 
   66      r<<
"plot(approxfun(x, y, rule = 2:1), 0, 11,col = 'tomato', add = TRUE, lty = 3, lwd = 2)";
 
   70      r << 
"print('Result of approxfun with default method')";
 
   71      r << 
"print(paste('x = ',x,'  f(x) = ',f(x2)))";
 
   72      r << 
"print('Result of approxfun with const method')";
 
   73      r << 
"print(paste('x = ',x,'  f(x) = ',fc(x2)))";
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
ROOT R was implemented using the R Project library and the modules Rcpp and RInside
 
static TRInterface & Instance()
static method to get an TRInterface instance reference
 
This is the base class for the ROOT Random number generators.