Case closed?
I like this as well:
matrix s = X[randperm(r,n),]
Yiannis