Here's my list of data frames:
[[1]]
ID Value
A 1
B 1
C 1
[[2]]
ID Value
A 1
D 1
E 1
[[3]]
ID Value
B 1
C 1
I'm after a single data frame with unique (non-redundant) IDs in the left hand column, replicates in columns, and NULL values as 0:
ID [1]Value [2]Value [3]Value
A 1 1 0
B 1 0 1
C 1 0 1
D 0 1 0
E 0 1 0
I've tried:
Reduce(function(x, y) merge(x, y, by=ID), datahere)
This provides a single list but without regards to where the original values come from, and duplicate IDs are repeated in new rows.
rbindlist(datahere, use.names=TRUE, fill=TRUE, idcol="Replicate")
This provides a single list with the [x]Value number as a new column called Replicate, but still it isn't in the structure I want as the ID column has redundancies.