From jeroen.ooms at stat.ucla.edu  Tue Jul 19 15:13:01 2011
From: jeroen.ooms at stat.ucla.edu (jeroen00ms)
Date: Tue, 19 Jul 2011 06:13:01 -0700 (PDT)
Subject: [Rd] Randomness not due to seed
Message-ID: <1311081181602-3678082.post@n4.nabble.com>

I am working on a reproducible computing platform for which I would like to
be able to _exactly_ reproduce an R object. However, I am experiencing
unexpected randomness in some calculations. I have a hard time finding out
exactly how it occurs. The code below illustrates the issue. 

mylm1 <- lm(dist~speed, data=cars);
mylm2 <- lm(dist~speed, data=cars);
identical(mylm1, mylm2); #TRUE

makelm <- function(){
	return(lm(dist~speed, data=cars));
}

mylm1 <- makelm();
mylm2 <- makelm();
identical(mylm1, mylm2); #FALSE

When inspecting both objects there seem to be some rounding differences.
Setting a seed does not make a difference. Is there any way I can remove
this randomness and exactly reproduce the object every time?





--
View this message in context: http://r.789695.n4.nabble.com/Randomness-not-due-to-seed-tp3678082p3678082.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] Randomness not due to seed
jeroen00ms