Quick look ups
By tholscla on Fri, 05/02/2014 - 13:17
// is the format for adding comments in Rcpp
int n= b.size(); //finds the length of a vector b
int m=B.nrow(); //finds the number of rows in a matrix
double x=runif(1)(0); //gets one random Uniform(0,1); runif returns a vector so we just use element (0).
pow(), not ^, for exponentiation.
sqrt() and exp() work
for a function that returns nothing use void func_name(int a){ return; }