Give a dataframe in R
structure(list(Feat1 = c("A", "B", "A", "B"), Time = c("Start",
"Start", "Finish", "Finish"), Value = c("Value1", "Value2", "Value3",
"Value2"), feat2 = c("Alpha", "Bravo", "Alpha", "Bravo"), Frequency = c(2L,
4L, 5L, 3L)), class = "data.frame", row.names = c(NA, -4L))
I have both the frequencies and also features of a certain set of observations. I want all the frequencies to be converted to a number of rows equal to the frequency value while keeping the features.
As an example, the first row becomes these 2 rows because frequency was 2