Skip to content
Prev 353490 / 398502 Next

Error in rep in matrix - Windows 8- R 3.2.1

y <- matrix(rep(10,4),2,2)
[,1] [,2]
[1,]   10   10
[2,]   10   10



I expected an output of
[,1] [,2]
[1,]   10   4
[2,]   10   4



Thanks and Regards.