[R] randomize
Uwe Ligges
ligges at statistik.uni-dortmund.de
Wed Aug 24 13:33:43 CEST 2005
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
>
More information about the R-help
mailing list