How can I reshape this dataframe regarding the multiple information of the columns 2:7 (day_rep), obtaining this new "datlong" dataframe with the coumns: "trat" "day" "rep" "value"
dat <- read.table(header=T, text='
trat 5_1 5_2 6_1 6_2 7_1 7_2
control 0 0 0 0 12 66
control 0 0 0 0 14 76
control 0 0 0 0 18 78
control 0 0 0 0 16 74
control 0 0 0 0 20 76
urea 0 0 0 12 42 88
urea 0 0 0 8 34 76
urea 0 0 0 6 28 68
urea 0 0 0 4 40 60
urea 0 0 0 10 46 78
')