SignedIndexList: Convert a list into a SignedIndexList

Description Usage Arguments Value Examples

Description

Convert a list into a SignedIndexList

Usage

1
2
3
4
SignedIndexList(object, ...)

## S4 method for signature 'list'
SignedIndexList(object, keepNA = FALSE, keepDup = FALSE, offset = 1L)

Arguments

object

A list of lists, each with two elements named 'pos' or 'neg', can be logical vectors or integer indices

...

additional arguments, currently ignored

keepNA

Logical, whether NA indices should be kept or not. Default: FALSE (removed)

keepDup

Logical, whether duplicated indices should be kept or not. Default: FALSE (removed)

offset

offset; 1 if missing

Value

A SignedIndexList, a list of lists, containing two vectors named 'positive' and 'negative', which contain the indices of genes that are either positively or negatively associated with a certain phenotype

Examples

1
2
3
4
5
6
myList <- list(a = list(pos = list(1, 2, 2, 4), neg = c(TRUE, FALSE, TRUE)), 
b = list(NA), c = list(pos = c(c(2, 3), c(1, 3))))
SignedIndexList(myList)

## a special case of input is a single list with two elements, \code{pos} and \code{neg}
SignedIndexList(myList[[1]])

Accio/BioQC documentation built on Jan. 27, 2022, 10:45 p.m.