Testing randomness in R