uncollapse: Uncollapse/Recollapse

uncollapseR Documentation

Uncollapse/Recollapse

Description

Uncollapse data.table cols

Usage

uncollapse(dt, ..., sep = ";")

recollapse(dt, by, sep = ";")

Arguments

dt

data.table

...

cols

sep

string

by

string

Examples

(dt <- data.table::data.table(
          uniprot  = 'Q9BQL6;Q96AC1;Q96AC1-3', 
          protein  = 'FERM1_HUMAN;FERM2_HUMAN', 
          gene     = 'FERMT1;FERMT2'))
(dt %<>% uncollapse(protein, gene, sep = ';'))
(dt %>% recollapse(by = 'uniprot')) 

bhagwataditya/autonomics documentation built on Nov. 1, 2024, 5:47 a.m.