Hello

 

I have a one question about random sampling matrix

 

I want to regeneration value of matrix

For example, 

Matrix A : 

1  2  3

11 12 13

21 22 23 .

> sample= data.frame(a[sample(1:dim(a)[1]),sample(1:dim(a)[2])])

Then, 

Matrix sample :

21 23 22

11 13 12

1  3  2

 

But, I want to regeneration.

Ex) Matrix sample

1      23  2

22  11  3

12  21  13

 

Pleases kindly help with R code¡¦

 

Thank you.

 


        [[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