chinsoon12 fix sample when x is of length one
626a5fd Nov 30, 2016
fix sample when x is of length one
see first paragraph in Details in ?sample
626a5fd