---
title: "Data function - numeric-slice"
slug: "numeric-slice-data-function"
updated: 2022-07-27T14:44:39Z
published: 2022-07-27T14:44:39Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://code.tag.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# numeric-slice

### numeric-slice
**creates: *categorical variable*** 

A `numeric-slice` data function produces a categorical `variable`. The categorical variable will be assigned based on whether the `criterion`, a numeric `variable`, satisfies the `operator` and `value`.

<table><thead><tr><th class=fr-thick><span style=font-size:14px><strong>attribute</strong></span><th class=fr-thick><span style=font-size:14px><strong>type</strong></span><th class=fr-thick><span style=font-size:14px><strong>description</strong></span><th class=fr-thick><span style=font-size:14px><strong>options</strong></span><tbody><tr><td style=width:25%><code>operator</code><td style=width:25%>string<td style=width:25%>a symbol denoting the comparative operation to perform<td style=width:25%><li><code>&lt;</code><li><code>&lt;=</code><li><code>></code><li><code>>=</code><li><code>=</code><li><code>!=</code><tr><td style=width:25%><code>criterion</code><td style=width:25%>object<td style=width:25%>numeric data to evaluate<td style=width:25%><li><code>collection</code><li><code>data_function</code><li><code>argument_reference</code><tr><td style=width:25%><code>value</code><td style=width:25%><li>int<li>float<td style=width:25%>numeric data<td style=width:25%><li><code>collection</code><li><code>data_function</code><li><code>argument_reference</code></table>

```json
{
  "data_function_type": "numeric-slice",
  "criterion": ...,
  "operator": ">",
  "value": #
}
```
