[R] how to randomize a vector
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Nov 12 08:04:39 CET 2007
?sample
On Sun, 11 Nov 2007, leffgh wrote:
>
> I have a vector whose length is nearly 70 thousand.
> I need randomize it for 1000 times .
> for randomizing , I mean ,the elements of the vector remain intact while
> their order in the vector get changed randomly.
> I have written a function which seems to be able to solve short vectors ,
> but waste a lot of time when dealing with the the long vector mentioned
> above.
>
>
--
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
More information about the R-help
mailing list