I am trying to create an array out of a list with different numbers of outputs for each value that I obtained from a function.
This is the code I am using:
list_i1 = sapply(implicit$image_1_id, num, simplify = 'array')
And these are the outputs.
> list_i1[[1]]
[1] 86 101
> list_i1[[2]]
[1] 35 61 112
> list_i1[[3]]
[1] 10 15
Due to the fact that some of the values have more 2 output numbers whereas some have 3, I am unable to create an array from the following list. Ideally, I would like to have a zero in the slot that isn't filled by a third output within the array so as to look like this:
1 86 35 10
2 101 61 15
3 0 112 0