[R] random numbers selection - simple example

Sarah Goslee sarah.goslee at gmail.com
Wed Jun 6 16:54:58 CEST 2007


Assuming you want only integers, see
?sample

Sarah

On 6/6/07, Jenny Barnes <jmb at mssl.ucl.ac.uk> wrote:
> Dear R-help,
>
> Which random number generator function would you recommend for simply picking 15
> random numbers from the sequence 0-42? I want to use replacement (so that the
> same number could potentially be picked more than once).
>
> I have read the R-help archives and the statistics and computing book on modern
> Applied statistics with S but the advice seems to be for much form complicated
> examples, there must be a simpler way for what I am trying to do?
>
> If anybody can help me I would greatly appreciate your advice and time,
>
> Best Wishes,
>
> Jenny
>
>


-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list