Re: [R] randomize

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Wed 24 Aug 2005 - 21:33:43 EST

Luis Tercero wrote:

> Dear helpeRs,
>
> I am looking for an R equivalent of the S function "randomize" but
> cannot find it anywhere (?randomize, help.search("randomize")). There
> are some references to "Randomize()" in the list archives, but it is not
> on my system (R 2.1.1 on Windows XP)... what package is it in?

In principle, you are looking for sample().

If you don't need other values for the "restrict" argument than the default, you can simply define:

randomize <- function(x)

   sample(seq(nrow(x)))

Uwe Ligges

> Thanks!
>
> Luis
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Aug 24 21:42:38 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:49:47 EST