I have the following lists:
sample location date spiceis sp.ab
1 001 9/10/2017 sp1 2
1 001 9/10/2017 sp2 5
1 001 9/10/2017 sp3 10
1 001 9/10/2017 sp4 2
2 002 9/11/2017 sp1 0
2 002 9/11/2017 sp2 2
2 002 9/11/2017 sp3 5
2 002 9/11/2017 sp4 5
3 003 9/12/2017 sp1 2
3 003 9/12/2017 sp2 1
3 003 9/12/2017 sp3 1
3 003 9/12/2017 sp4 0
4 004 9/13/2017 sp1 7
4 004 9/13/2017 sp2 4
4 004 9/13/2017 sp3 2
4 004 9/13/2017 sp4 9
And i would like to return a dataframe that looks like the following. Can anyone help me with this?
sample location date sp1 sp2 sp3 sp4
1 001 9/10/2017 2 5 10 2
2 002 9/11/2017 0 2 5 5
3 003 9/12/2017 2 1 1 0
4 004 9/13/2017 7 4 2 9