Hi Thanoon,

How about this?
# replicate p=10 times random sampling n=1000 from a vector containing your
ordinal categories (1,2,3,4)
R <- replicate(10, sample(as.vector(seq(4)), 1000, replace = T))

Cheers,
Charles



On Fri, Apr 4, 2014 at 7:10 AM, thanoon younis
<thanoon.youni...@gmail.com>wrote:

> dear sir
> i want to simulate multivariate ordinal data matrix with categories (1,4)
> and n=1000 and p=10.
> thanks alot
>
> thanoon
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org 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.
>



-- 
Charles Determan
Integrated Biosciences PhD Candidate
University of Minnesota

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to