Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

list_to_matrix

Convert a List of Sets to a Binary Matrix


Description

Convert a List of Sets to a Binary Matrix

Usage

list_to_matrix(lt, universal_set = NULL)

Arguments

lt

A list of vectors.

universal_set

The universal set.

Details

It converts the list which have m sets to a binary matrix with n rows and m columns where n is the size of universal set.

Examples

set.seed(123)
lt = list(a = sample(letters, 5),
          b = sample(letters, 10),
          c = sample(letters, 15))
list_to_matrix(lt)
list_to_matrix(lt, universal_set = letters)

ComplexHeatmap

Make Complex Heatmaps

v2.6.2
MIT + file LICENSE
Authors
Zuguang Gu
Initial release
2020-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.