lundi 20 juin 2016

Random Numbers in R and C++

Say I want to generate a vector of 10 random numbers. How would I be able to do so in R and c++ such that I get the same vector?

I know in C++ I gotta use srand() and then rand() while in R I can use set.seed() and then runif.

But how would I get them to be the same?

Aucun commentaire:

Enregistrer un commentaire