R sample (revised)