im2list_dep: convert incidence matrix to list

im2list_depR Documentation

convert incidence matrix to list

Description

convert incidence matrix to list

Usage

im2list_dep(x, verbose = FALSE, ...)

Details

This function converts an incidence matrix, or equivalent data.frame, to a list. The matrix should contain either numeric values such as c(0, 1), or logical values such as c(TRUE,FALSE), otherwise values are considered either zero == FALSE, or non-zero == TRUE.

The resulting list will be named by colnames(x) of the input, and will contain members named by rownames(x) which are either non-zero, or contain TRUE.

Values of NA are converted to zero 0 and therefore ignored.

This function uses the transactions class from the arules R package, which in our testing is substantially faster than similar techniques from a variety of other R packages.

Value

list of ⁠character vectors⁠, where list names are defined by colnames(x), and vectors contain values from rownames(x).

See Also

Other jam list functions: colors_from_list(), im2list(), imSigned2list_dep(), imSigned2list(), list2concordance(), list2imSigned(), list2im()


jmw86069/jamenrich documentation built on Nov. 6, 2024, 7:07 p.m.