Skip to content

Commit

Permalink
Increase size of vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoneta committed Nov 2, 2016
1 parent 77d1919 commit 84ed2f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tutorials/r/example.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ void example() {

// compute standard deviation of 1000 vector normal numbers

double std_dev_r = r.Eval("sd(rnorm(1000))");
std::vector<double> v = r.Eval("rnorm(1000)");
double std_dev_r = r.Eval("sd(rnorm(10000))");
std::vector<double> v = r.Eval("rnorm(10000)");
double std_dev_root = TMath::StdDev(v.begin(),v.end());
std::cout << "standard deviation from R = " << std_dev_r << std::endl;
std::cout << "standard deviation from ROOT = " << std_dev_root << std::endl;
Expand Down

0 comments on commit 84ed2f4

Please sign in to comment.