I have a dataset looks like this:
So in the second row of the column'leaf_grade', we could see the value of '1-5', so in what I want is the row replicate 5 times with all the values on the row being the same except the 'leaf-grade' changes from 1 to 5.
So the output should look like:
Column 32 33 34 35 36 37 38 colour_grade leaf_grade
-775 -700 -625.00 -600 -600 -600 -600 61 1
-775 -700 -625.00 -600 -600 -600 -600 61 2
-775 -700 -625.00 -600 -600 -600 -600 61 3
-775 -700 -625.00 -600 -600 -600 -600 61 4
-775 -700 -625.00 -600 -600 -600 -600 61 5
Could we achieve this result in r? could we use dplyr to achieve this?