Suppose we have the following data set named data1.
data1
id v1 v2 1 5 0.5 1 4 0.5 1 6 0.5 2 2 0.2 2 3 0.2 2 7 0.2