Hi,

I am new with R.

Need Help on this. I would like to create a matrix of a random integer.

Example:

Currently, I am using "sample" function. This will create a matrix of integer but some integer values by row are similar.

3 2 4 1

4 1 3 2

1 3 1 3

2 4 2 4

Actually, I would like to generate this type of matrix:

3 2 4 1

4 1 3 2

1 3 2 4

2 4 1 3

Any idea of doing this. Really appreciate any help. Thanks.