split_cdb {CellaRepertorium} | R Documentation

## Split into a list of `ContigCellDB()` by named fields

### Description

Split into a list of `ContigCellDB()` by named fields

### Usage

    split_cdb(ccdb, fields, tbl = "contig_tbl", drop = FALSE, equalize = TRUE)

### Arguments

`ccdb` | `ContigCellDB()`
`fields` | `character` naming fields in `tbl`
`tbl` | one of `contig_tbl`, `cell_tbl` or `cluster_tbl`
`drop` | logical indicating if levels that do not occur should be dropped (if `f` is a `factor` or a list).
`equalize` | `logical`. Should the contig, cells and clusters be equalized by taking the intersection of their common keys?

### Value

list of `ContigCellDB`

### Examples

    data(ccdb_ex)
    splat = split_cdb(ccdb_ex, 'chain', 'contig_tbl')
    stopifnot(all(splat$TRA$contig_tbl$chain == 'TRA'))
    stopifnot(all(splat$TRB$contig_tbl$chain == 'TRB'))

[Package CellaRepertorium version 1.2.0 Index]