I have one data set with 61 variables.Last column have name Weight.So my intention is to replicate each row by the value of last column. For example if value is two, code need to copy this row by two times, if value is three then should copy three times etc.You can see small example of data set below.
#DATA
TEST<-data.frame(
Value =c(8634,5798,6022),
Income =c(8834,5898,6033),
Weight =c(2,3,1))
So my intention is to transform table above, like table below.
So can anybody help me how to transform this table ?