filterParams {karyoploteR} | R Documentation

## filterParams

### Description

Given a list, select just only the valid.elements from each member. Also works with vectors instead of lists

### Usage

    filterParams(p, valid.elements, orig.length)

### Arguments

`p` | a list or a single vector
`valid.elements` | a boolean vector with the elements to keep
`orig.length` | the length of the elements on which to apply the filtering

### Details

This function is used in filtering the graphical parameters when plotting only a part of the genome. For each element of the list, if it has the exact specified length, filters it using the 'valid.elements' parameter.

### Value

p with some members filtered

### Examples

    a <- 1:10
    b <- 3:5
    c <- 2

    filterParams(list(a,b,c), c(rep(TRUE,5), rep(FALSE,5)), 10)
    filterParams(a, c(rep(TRUE,5), rep(FALSE,5)), 10)

[Package karyoploteR version 1.10.5 Index]