Skip to content

set.seed ( ) function

4 messages · Joshua Wiley, Niels Richard Hansen, Tal Galili

#
On Thu, Apr 21, 2011 at 8:34 PM, Penny Bilton <pennybilton at xnet.co.nz> wrote:
Sure, just because numbers are random does not guarantee that equal
numbers from both groups will be sampled.  Perhaps you are looking for
some sort of constrained random sampling like sampling x from group 1
and x from group 2?  If so, try calling sample() separately on each
group (for help applying the same function to different groups, take a
look at ?by or ?tapply for example).

Josh

PS cced back to list

  
    
#
Tal

Let me express some concern about using words like "true" or "real"
in relation to random number generation - for exactly the same reasons
as mentioned here:

http://xianblog.wordpress.com/2010/09/07/truly-random/

Device random number generators (whether provided via web-services or not) 
should be regarded with as much skepticism as algorithmic generators, and
they typically don't have a set.seed() function for reproducibility -- you
would have to store the entire sequence.

- Niels
On 22/04/11 04.28, Tal Galili wrote: