Johannes Reichl
2007-Nov-28 08:08 UTC
[R] How can I read the actual value (?) defined by set.seed(?) earlier?
Hi all I need to get the seed value that has been set by set.seed() earlier. I only do have the workfile *.Rdata so I can not simply look to the code. Thanx for any help, J Mag. Johannes Reichl Abteilung Energiewirtschaft Energieinstitut an der Johannes Kepler Universit?t Linz Altenberger Stra?e 69 A-4040 Linz ***************************** Tel.: +43-732-2468-5652 Fax: +43-732-2468-5651 Email: reichl at energieinstitut-linz.at
Prof Brian Ripley
2007-Nov-28 08:28 UTC
[R] How can I read the actual value (?) defined by set.seed(?) earlier?
On Wed, 28 Nov 2007, Johannes Reichl wrote:> I need to get the seed value that has been set by set.seed() earlier. I > only do have the workfile *.Rdata so I can not simply look to the code.You cannot: it is not stored at the time. set.seed() sets .Random.seed, and you can save/restore that. However, the workspace will only contain the current value, not the initial value. Normally the history is saved when you save the workspace: perhaps you do still have that and can search it for your call to set.seed (if there is one: there need not be). -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595