---
title: "Data function - set-combinations"
slug: "set-combinations-data-function"
updated: 2022-07-27T14:23:08Z
published: 2022-07-27T14:23:08Z
---

> ## 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.

# set-combinations

### set-combinations

**creates: *categorical collection*** A `set-combinations` data function converts two-or-more categorical data functions into a new, dynamic `collection` representing combinations of categorical `variables`.

| **attribute** | **type** | **description** | **options** |
| --- | --- | --- | --- |
| `operator` | string | how to combine the criteria and categoricals data | `all``single``pairwise` |
| `criteria` | array | categorical data | `data_function``argument_reference` |
| `categoricals` | array | categorical data | `data_function``argument_reference` |

```
{
  "data_function_type": "set-combinations",
  "operator": "all",
  "criteria": [
    ...
  ],
  "categorical": [
    ...
  ]
}
```

By default, the `operator` attribute is set to `all`. The `all` operator means that each `variable` from the collections in the `criteria` array will be intersected with every categorical `variable` from all of the collections in the `categoricals` array. Dynamic `variable` names from all-vs-all combinations are created.

If the operator attribute is set to `single`, each categorical `variable` from the collections defined in the `criteria` array will be analyzed independently.

If the operator attribute is set to `pairwise`, each categorical `variable` from the collections defined in the `criteria` array will be intersected with every categorical `variable` from each of the other collections in the `categoricals` array. Dynamic `variable` names from all pairwise combinations of variables are created.
