IndexList: Convert a list to an IndexList object

Description Usage Arguments Value Examples

Description

Convert a list to an IndexList object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
IndexList(object, ..., keepNA = FALSE, keepDup = FALSE, offset = 1L)

## S4 method for signature 'numeric'
IndexList(object, ..., keepNA = FALSE, keepDup = FALSE,
  offset = 1L)

## S4 method for signature 'logical'
IndexList(object, ..., keepNA = FALSE, keepDup = FALSE,
  offset = 1L)

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

Arguments

object

Either a list of unique integer indices, NULL and logical vectors (of same lengths), or a numerical vector or a logical vector. NA is discarded.

...

If object isn't a list, additional vectors can go here.

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

Integer, the starting index. Default: 1 (as in the convention of R)

Value

The function returns a list of vectors

Examples

1
2
3
4
5
6
7
8
9
testList <- list(GS_A=c(1,2,3,4,3),
                 GS_B=c(2,3,4,5),
                 GS_C=NULL,
                 GS_D=c(1,3,5,NA),
                 GS_E=c(2,4))
testIndexList <- IndexList(testList)
IndexList(c(FALSE, TRUE, TRUE), c(FALSE, FALSE, TRUE), c(TRUE, FALSE, FALSE), offset=0)
IndexList(list(A=1:3, B=4:5, C=7:9))
IndexList(list(A=1:3, B=4:5, C=7:9), offset=0)

BioQC documentation built on May 2, 2018, 3:40 a.m.