How can I select random subsets (rows!) from a data set ?

If I generate simple data set

> a <- data.frame(x=1:2, y = NaN, z = 2:1)
> a
  x   y z
1 1 NaN 2
2 2 NaN 1

I can select random subsets (colums) very easily using sample function:

> sample(a, 2)
  z   y
1 2 NaN
2 1 NaN

I expected that using transpose of a would do the same for rows, but I am 
getting
rather unexpected outcome

> sample(t(a), 1)
<NA>
   1

R

	[[alternative HTML version deleted]]


