numeric-compound
  • 27 Jul 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

numeric-compound

  • Dark
    Light
  • PDF

Article summary

The numeric-compound parser will load data from two or more columns in a source data table and combine their values before producing a numeric variable within a collection.

It inherits attributes and behaviors from its parent: parser - numeric.

Note - the columns attribute supersedes the column attribute, which is not used in this parser type.

Attribute - operator

The operator attribute is required.

{
  "parser_type": "numeric-compound",
  "columns": [
    "ccc1",
    "ccc2"
  ]
  
  // The value of the operator attribute is a numeric operator
  // which will combine values from the inner column parsers
  // 
  // Options include:
  // "+"
  // "-"
  // "*"
  // "/"
  // "%"
  // "^"
  // "log10+" - adds logs
  // "ln+" - adds logs
  // "log2+" - adds logs
  // "boxcox10+" - adds logs
  // "log10-" - subtracts logs
  // "ln-" - subtracts logs
  // "log2-" - subtracts logs
  // "boxcox10-" - subtracts logs
  //
  "operator": "*",
  
  "collection": "collection_name",
  "collection": "variable_name"
}

Attribute - columns

The columns attribute is required.

{
  "parser_type": "numeric-compound", 
  "operator": "*",
  
  // The columns attribute specifies two column names
  // to produce values for combination
  //
  "columns": [
    "ccc1", // column one name - a parser will be auto-generated
    "ccc2"  // column two name - a parser will be auto-generated
  ],
  
  "collection": "collection_name",
  "collection": "variable_name"
}

Attribute - columns as parsers

The columns attribute is required.

{
  "parser_type": "numeric-compound", 
  "operator": "*",
  
  // The columns attribute specifies two inner parsers 
  // to produce values for combination
  //
  "columns": [
    {...}, // parser one
    {...} // parser two
  ],
  
  "collection": "collection_name",
  "collection": "variable_name"
}

Was this article helpful?