Useful “R” Snippet
September 2, 2008
I am using R quite a bit at the moment and found a useful snippet of code to generate random “coin tosses”:
x <- sample(c(-1,1), 1000, TRUE)
Thoughts, tips and rants from a professional programmer
I am using R quite a bit at the moment and found a useful snippet of code to generate random “coin tosses”:
x <- sample(c(-1,1), 1000, TRUE)