Of course you can sample each row:
sapply (1:4, function (row) df1[row,]<<-sample(df1[row,]))
will shuffle the rows itself, so the number of 1
's in each row doesn't change. Small changes and it also works great with columns, but this is a exercise for the reader :-P