Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

Column reference example:

ABS
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:
abs(MyInteger) as:'abs_MyInteger'

abs(MyInteger)


Output:
Generates the new abs_MyInteger column containing the  Returns the absolute value of each value found in the MyInteger column.

Numeric literal example:

ABS
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextdelete row:(
abs(MyInteger) == 5)

...

(abs(MyInteger) == 5)

Output: Returns true if the absolute value of the entry in the MyInteger column is 5.

D s
snippetSyntax

ABS
d-codelang-syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:
abs(numeric_value)

abs(numeric_value)


ArgumentRequired?Data TypeDescription
numeric_valueYstring, decimal, or integerName of column or Decimal or Integer literal to apply to the function

...

You can use the following transform to derive the absolute values of these columns, which now measure distance from the fixed point:

d-

...

trans
RawWrangletrue
p03Value'distanceX'
Typestep
WrangleTextderive type:single value:

...

abs(X) as: 'distanceX'

...

p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Valueabs(X)
p03NameNew column name
SearchTermNew formula

D trans
RawWrangletrue
p03Value'distanceY'
Typestep
WrangleTextderive type:single value:

...

abs(Y) as: 'distanceY'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Valueabs(y)
p03NameNew column name
SearchTermNew formula

Results:

XYdistanceXdistanceY
-2424
-6.2-26.22
0-4.204.2
4444
15-0.05150.05

...