For example, if I have a multidimensional list object, say, "x"
x <- list(); x[] <- c(1,2,3); x[] <- c(2,3,4);
x[] <- c(3,4,5); x[] <- c(4,5,6)
a <- combn(x,3)
c(a[1:3,1]) is equivalent here to
a[1:3,1] which is equivalent here to
a[1:3]. All this does is combine the list, not combine the elements of this list.
do.call executes a function call against a list of arguments, in this case, it executes the
c function to combine the elements of
What you want is
c(a[1:3], recursive = TRUE), which descends through the list recursively combining elements into a single vector.