vendredi 10 juillet 2020

Is there a function in R to see what is the value of seed at a particular point of time? [duplicate]

I want a function which outputs the value of seed when it is called. For example

set.seed(3)
seed_val() #The required function, this should output 3
y = rnorm(100)
seed_val() #This should output the value of seed at this time, so as to know 
           #whether the seed is reset or still 3
x = rnorm(100) #Suppose this gives us a very desirable result, then the seed_val 
               #in the previous line would help me to reproduce this desirable 
               #result later.



Aucun commentaire:

Enregistrer un commentaire