Spread row values into columns
Data looks like
> head(df2)
ID fungi Conc Abs date_no
1 1 R3 2.500000 0.209 0
22 1 R3 1.250000 0.153 0
43 1 R3 0.625000 0.159 0
64 1 R3 0.312500 0.164 0
85 1 R3 0.156250 0.157 0
106 1 R3 0.078125 0.170 0
And I used this function, which spread the date column into three columns but didn't populate them correctly.
separate_DF <- spread(df2, "date_no", "Abs")
What I get is this...
> head(df3)
ID fungi Conc date_no_0 date_no_1 date_no_3
1 1 R3 0.01953125 0.162 NA NA
2 1 R3 0.03906253 0.169 NA NA
3 1 R3 0.07812500 0.170 NA NA
4 1 R3 0.15625000 0.157 NA NA
5 1 R3 0.31250000 0.164 NA NA
6 1 R3 0.62500000 0.159 NA NA
So that the three date columns are populated by the Abs values. And each fungi at each concentration is its own row.