I'd like to to convert a list of numeric vectors into a single matrix with different length of columns.
This is the structure of the list, each "Name" is a element of the list :
$ Name 1 : num [1:5] 3 3 4 0 5
$ Name 2 : num [1:4] 3 2 4 0
$ Name 3 : num [1:7] 3 3 4 0 5 4 4
$ Name 4 : num [1:7] 3 1 4 0 5 5 4
I expect this result:
Name 1 | Name 2 | Name 3 | Name 4 |
---|---|---|---|
3 | 3 | 3 | 3 |
3 | 2 | 3 | 1 |
4 | 4 | 4 | 4 |
0 | 0 | 0 | 0 |
5 | NA | 5 | 5 |
NA | NA | 4 | 5 |
NA | NA | 4 | 4 |
How can I build this matrix ? Thank you in advance