duplicate rows in r based on one column. frame(x1,x2) df1 Output