See my response to your thread " controling the size of vectors in a
matrix". Please do not create multiple threads on the same day asking
basically the same question, especially if you cannot substantially
improve the clarity and quality of the post.
Multiple threads asking the same question badly within the span of few
hours leads to people missing out on other people's response and thereby
essentially wasting their time.
raymond chiruka wrote:> l would like to create the following matrice
>
> treatmentgrp strata
> 1 1 1 1 1 1 1 2
1 2 1 2 2 1 2 1 2 1
2 2 2 2 2 2 l should be able to choose the size
of the treatment grps and stratas the method l used intially creates the matrice
randomly
>
> n=20
>
> m <- cbind( treatmentgrp = sample( 1:2,n, replace=T ),
>
> strata = sample( 1:2, n, replace=T ),
>
> survivalTime = rexp( n, rate=0.07 ),
>
> somethingElse = rexp( n, rate=0.02 )
>
> thanks
>
>
>
> ---------------------------------
> Give spam the boot. Take control with tough spam protection
>
> [[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.
>
>
>