Insert two new rows after every 7 rows

I'm new in Knime and was wondering if this is possible in Knime and what nodes i can use to achieve this.

I have a table that looks like this:

U011709 AA47 2.5uL 4mM
U011709 AB47 2.5uL 4mM
U011709 AC47 2.5uL 4mM
U011709 AD47 2.5uL 4mM
U011709 AE47 2.5uL 4mM
U011709 AF47 2.5uL 4mM
U011709 A48 2.5uL 4mM
U011710 B48 2.5uL 4mM
U011710 C48 2.5uL 4mM
U011710 D48 2.5uL 4mM
U011710 E48 2.5uL 4mM
U011710 F48 2.5uL 4mM
U011710 G48 2.5uL 4mM
U011710 H48 2.5uL 4mM

After 7 rows there should be 2 new rows and the values from colum 1 should be copied in column 1 of the new rows . The next step is to add in the first new row in column 2 the string "Mean" and in the second new row in column 2 the string "AVG". This should be repeated every 7 rows. The original file is much longer.

Finally the table should look like this:

U011709 AA47 2.5uL 4mM
U011709 AB47 2.5uL 4mM
U011709 AC47 2.5uL 4mM
U011709 AD47 2.5uL 4mM
U011709 AE47 2.5uL 4mM
U011709 AF47 2.5uL 4mM
U011709 A48 2.5uL 4mM
U011709 Mean    
U011709 STD    
U011710 B48 2.5uL 4mM
U011710 C48 2.5uL 4mM
U011710 D48 2.5uL 4mM
U011710 E48 2.5uL 4mM
U011710 F48 2.5uL 4mM
U011710 G48 2.5uL 4mM
U011710 H48 2.5uL 4mM
U011710 Mean    
U011710 STD    

Is there someone who knows if this is possible at all?

Thanks,

Ron

You could do a counting loop and do a switch on whether the row index is a multiple of 7 (or maybe 6 if it counts from 0). 

However, it looks like you may actually have an ID value that is linked to the 7 rows? In that case you could do a group loop start and use the first column as the group. In each iteration you will get that rows data, you can then append the Mean and STD rows and output 9 rows from the end of the loop.

Chers

Sam

Hi Swebb,

 

thanks for the sugestions. I have to look into this. Find the mentioned nodes and lookup how to use them. Will give it a try