4 ms·
You gotta do what you gotta do, but your example probably doesn't do what you want in R. > system.time(vec1 <- rnorm(1000000)) user system elapsed
by ltjohnson 16y ago
You gotta do what you gotta do, but your example probably doesn't do what you want in R.
> system.time(vec1 <- rnorm(1000000))
user system elapsed
0.200 0.000 0.199
My computer takes .2 seconds to generate the million random normals and assign them to vec1.
> vec1 = rnorm(1000000)
> system.time(vec1)
user system elapsed
0 0 0
My computer only takes 0 seconds to evaluate the existing vec1 of length one million.
- hessenwolf 16y agoAh - sorry - I was being a bit t'ick, and didn't twig the time thing. Should I require it, I will keep it in mind. Thank you.