exist_matrix: generate a matrix to show whether the item in each element of...

View source: R/dataframe.R

exist_matrixR Documentation

generate a matrix to show whether the item in each element of a list

Description

generate a matrix to show whether the item in each element of a list

Usage

exist_matrix(x, n_lim = 0, n_top = NULL, sort_items = NULL)

Arguments

x

list of character vectors

n_lim

n limit to keep items in result

n_top

only keep top n items in result

sort_items

function to sort the items, item frequency by default

Value

tibble

Examples

x <- 1:5 %>% purrr::map(
  ~ gen_char(to = "k", n = 5, random = TRUE, seed = .x)
)
exist_matrix(x)


baizer documentation built on Oct. 19, 2023, 9:07 a.m.