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

