[R] creating different strata
Petr Klasterecky
klaster at karlin.mff.cuni.cz
Wed May 16 13:45:51 CEST 2007
Something like this?
sample((1:10),100,replace=TRUE)
?sample
hth
Petr
raymond chiruka napsal(a):
> hie
> l would like to create about ten strata l have tried using
> sample(c(1,2),1,replace=TRUE) but all l get is a vector of 1 and 2 if i change it to sample(c(1,10),1,replace=TRUE) it gives me a vector of 1 and 10 how do l go about it
>
>
>
> ---------------------------------
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>
--
Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic
More information about the R-help
mailing list