I have a two column of data in which first column is a ID and second as a value. For example
ID Value
1 0.5
2 30
3 20
4 11
5 21
6 12
1 15
2 18
3 19
4 10
5 14
6 1
1 6
2 30
3 2.5
4 3
5 45
6 5
I want to split this column into
ID Value value1 value2
1 0.5 15 6
2 30 18 30
3 20 19 2.5
4 11 10 3
5 21 14 45
6 12 1 5
So far I have the following codes but I don't know how to split them.
data=data.table(trial.csv, header=T, sep=",")
dframe=data.frame(data)