First we should have some data:
df1<-data.frame(matrix(rnorm(20), nrow=10))
> df1
X1 X2
1 -0.5996083 0.80017687
2 -0.1294107 -0.16393097
3 0.8867361 1.24291877
4 -0.1513960 -0.93438506
5 0.3297912 0.39370865
6 -3.2273228 0.40363146
7 -0.7717918 -0.88643672
8 0.2865486 -1.31893760
9 -1.2205120 0.02884391
10 0.4345504 -0.43212979
Then select some rows at random:
df1[sample(nrow(df1), 3), ]
X1 X2
10 0.4345504 -0.4321298
5 0.3297912 0.3937087
8 0.2865486 -1.3189376