I have a list as follows:
alist <- list(number1 = structure("something", .Dim = c(1L, 1L)), number2 = structure("something", .Dim = c(1L,
1L)))
If I want to stack this list:
stack(alist)
It says: Error in stack.default(test) : at least one vector element is required
Why does this happen and how can I prevent this?
CodePudding user response:
Try this:
stack(unlist(alist))