2.2.16. addIndexed


Purpose

Add data in column(s) of mapped ASCIItable selected from the row indexed by the value in a mapping column. Row numbers start at 1.

parent_gray

Usage

> addIndexed options ASCII table(s) 

parent_gray

Options

--index
column label containing row index
-o / --offset [ 0 ]
constant offset for index column value
-l / --label
column label(s) to be appended
-a / --asciitable
indexed ASCIItable


parent_gray

Examples

  • add squared values
    Suppose we have a reference ASCIItable containing data to which we want to add the squared values of column » y «.
    2 head
    # reference ASCIItable
    x y
    1 1
    2 3
    3 4
    
    The lookup table contains
    2 head
    # lookup ASCIItable
    squared
    1
    4
    9
    16
    25
    

    >  addIndexed --index y --asciitable lookup --label squared < reference
    
    yields
    3 head
    # reference ASCIItable
    # addIndexed --index y --asciitable lookup --label squared
    x y squared
    1 1 1
    2 3 9
    3 4 16
    

This topic: Documentation > Processing > PostProcessing > AddIndexed
Topic revision: 19 Feb 2019, MartinDiehl
This site is powered by FoswikiCopyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DAMASK? Send feedback
§ Imprint § Data Protection