Skip to main content
13-Aquamarine
November 4, 2016
Solved

stack versus augment for unnesting

  • November 4, 2016
  • 1 reply
  • 1499 views

I would like to split up a single vector into a table. I would like to take e.g. each time 8 data points and put the next 8 at the right side thus constructing a table. Apparently I am overlooking something evident could someone help me out? Thanks in advance (MC15)

Best answer by StuartBruff

FDS wrote:

I would like to split up a single vector into a table. I would like to take e.g. each time 8 data points and put the next 8 at the right side thus constructing a table. Apparently I am overlooking something evident could someone help me out? Thanks in advance (MC15)

You can only augment vectors of the same length - some of your vectors don't meet this criterion.  Do you want something like this?

Stuart

1 reply

23-Emerald V
November 4, 2016

FDS wrote:

I would like to split up a single vector into a table. I would like to take e.g. each time 8 data points and put the next 8 at the right side thus constructing a table. Apparently I am overlooking something evident could someone help me out? Thanks in advance (MC15)

You can only augment vectors of the same length - some of your vectors don't meet this criterion.  Do you want something like this?

Stuart

FDS13-AquamarineAuthor
13-Aquamarine
November 4, 2016

Thank you Stuart! I must have missed the difference in length . So, if the length would have been the same the syntax with augment would have worked?

23-Emerald V
November 4, 2016

FDS wrote:

Thank you Stuart! I must have missed the difference in length . So, if the length would have been the same the syntax with augment would have worked?

Looks like it ... 

table1 is your original function.

Stuart