CEBL  2.1
test_rcontroller.cpp
Go to the documentation of this file.
1 #include "model/RController.hpp"
2 #include <cppR/cppR.hpp>
3 #include <unistd.h>
4 #include <iostream>
5 using namespace std;
6 using namespace cppR;
7 
8 int main(int argc, char *argv[])
9 {
11  R.start();
12  ublas::matrix<double> X = createMatrix(runif<double>(19*1000),19,1000);
14 
15  R.sendCommand("m = as.matrix(read.table(file='%f'))");
16  cout << R.getResponse();
17  R.sendCommand("dim(m)");
18  cout << R.getResponse();
19  R.sendCommand("x11();plot(m)");
20  cout << R.getResponse();
21 
22  sleep(5);
23  R.stop();
24 
25 }