Skip to content
Prev 336820 / 398513 Next

geneation

Hello,

I'm not sure I understand the question. When you use set.seed, it will 
have effect in all calls to the random number generator following it. So 
the value for y is also fixed.
As for your code, you don't need the second set.seed. And though it is 
not syntatically incorrect, the way you are coding it is not very usual. 
Try instead

set.seed(100)
x <- 10*runif(10)
x

y <- rnorm(10)
y

y <- rnorm(10)  #different y
y


Hope this helps,

Rui Barradas

Em 20-02-2014 07:05, IZHAK shabsogh escreveu: