Skip to content
Prev 350538 / 398503 Next

Stacking of vectors to form a column vector

Here are two correct uses of the "stack command", if by that you mean the
stack() function.
values ind
1      1   a
2      2   a
3      3   a
4      4   b
5      5   b
6      6   b
7      7   c
8      8   c
9      9   c
values ind
1      1   a
2      2   a
3      3   a
4      4   b
5      5   b
6      6   b
7      7   c
8      8   c
9      9   c

I would say that the "values" column of the output fits your description
of what you want to do. (though I used names a, b, c instead of y1, y2,
y3).

But without a reproducible example, one can't say for sure.