I have a data frame like this:
Site speciescode abundance times
LM1 MkI 9 3
LM2 KiU 8 4
I want to repeat the rows depending on the times values. I was thinking of using a loop to make the new dataframe as follows:
Site speciescode abundance
LM1 MkI 9
LM1 MkI 9
LM1 MkI 9
LM2 KiU 8
LM2 KiU 8
LM2 KiU 8
LM2 KiU 8
Help.